Documentation of 'org.supercsv.cellprocessor.Optional' Java class
Optional
org.supercsv.cellprocessor

Class Optional

  • All Implemented Interfaces:
    BoolCellProcessor, CellProcessor, DateCellProcessor, DoubleCellProcessor, LongCellProcessor, StringCellProcessor


    public class Optional
    extends ConvertNullTo
    This processor is used to indicate that a cell is optional, and will avoid executing further processors if it encounters null. It is a simple customization of ConvertNullTo.

    Prior to version 2.0.0, this processor returned null for empty String (""), but was updated because Tokenizer now reads empty columns as null. It also means that Optional can now be used when writing as well (instead of using ConvertNullTo("")).

    • Constructor Summary

      Constructors 
      Constructor and Description
      Optional()
      Constructs a new Optional processor, which when encountering null will return null, for all other values it will return the value unchanged.
      Optional(CellProcessor next)
      Constructs a new Optional processor, which when encountering null will return null , for all other values it will call the next processor in the chain.
    • Method Summary

      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • Optional

        public Optional()
        Constructs a new Optional processor, which when encountering null will return null, for all other values it will return the value unchanged.
      • Optional

        public Optional(CellProcessor next)
        Constructs a new Optional processor, which when encountering null will return null , for all other values it will call the next processor in the chain.
        Throws:
        java.lang.NullPointerException - if next is null

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.