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 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 Details

  • Constructor Details

    • NullObjectPattern

      private NullObjectPattern()
  • Method Details

    • execute

      public Object execute(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 interface CellProcessor
      Parameters:
      value - the value to be processed
      context - the CSV context
      Returns:
      the result of cell processor execution