1 package com.github.mygreen.supercsv.cellprocessor.conversion;
2
3 import org.supercsv.cellprocessor.CellProcessorAdaptor;
4 import org.supercsv.cellprocessor.ift.StringCellProcessor;
5 import org.supercsv.util.CsvContext;
6
7
8
9
10
11
12
13
14 public class Lower extends CellProcessorAdaptor implements StringCellProcessor {
15
16 public Lower() {
17 super();
18 }
19
20 public Lower(final StringCellProcessor next) {
21 super(next);
22 }
23
24 @Override
25 public <T> T execute(final Object value, final CsvContext context) {
26 if(value == null) {
27 return next.execute(value, context);
28 }
29
30 final String result = value.toString().toLowerCase();
31 return next.execute(result, context);
32 }
33
34 }