Package org.supercsv.cellprocessor
Class CellProcessorAdaptor.NullObjectPattern
- java.lang.Object
-
- org.supercsv.cellprocessor.CellProcessorAdaptor.NullObjectPattern
-
- All Implemented Interfaces:
BoolCellProcessor
,CellProcessor
,DateCellProcessor
,DoubleCellProcessor
,LongCellProcessor
,StringCellProcessor
- Enclosing class:
- CellProcessorAdaptor
private static final class CellProcessorAdaptor.NullObjectPattern extends java.lang.Object implements BoolCellProcessor, DateCellProcessor, DoubleCellProcessor, LongCellProcessor, StringCellProcessor
This is an implementation-specific processor and should only be used by the CellProcessorAdaptor class. It is the implementation of the null object pattern (it does nothing - just returns the value!) and should always be the last CellProcessor in the chain. It is implemented as a reusable singleton to avoid unnecessary object creation.
-
-
Field Summary
Fields Modifier and Type Field Description private static CellProcessorAdaptor.NullObjectPattern
INSTANCE
-
Constructor Summary
Constructors Modifier Constructor Description private
NullObjectPattern()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
execute(java.lang.Object value, CsvContext context)
This method is invoked by the framework when the processor needs to process data or check constraints.
-
-
-
Field Detail
-
INSTANCE
private static final CellProcessorAdaptor.NullObjectPattern INSTANCE
-
-
Method Detail
-
execute
public java.lang.Object execute(java.lang.Object value, CsvContext context)
This method is invoked by the framework when the processor needs to process data or check constraints.- Specified by:
execute
in interfaceCellProcessor
- Parameters:
value
- the value to be processedcontext
- the CSV context- Returns:
- the result of cell processor execution
-
-