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

Class ParseEnum

    • Constructor Summary

      Constructors 
      Constructor and Description
      ParseEnum(java.lang.Class<T> enumClass)
      Constructs a new ParseEnum processor, which converts a String to a Enum.
      ParseEnum(java.lang.Class<T> enumClass, boolean ignoreCase)
      Constructs a new ParseEnum processor, which converts a String to a Enum, ignoring the case of the input (or not) depending on the supplied flag.
      ParseEnum(java.lang.Class<T> enumClass, boolean ignoreCase, CellProcessor next)
      Constructs a new ParseEnum processor, which converts a String to a Enum, ignoring the case of the input (or not) depending on the supplied flag, then calls the next processor in the chain.
      ParseEnum(java.lang.Class<T> enumClass, CellProcessor next)
      Constructs a new ParseEnum processor, which converts a String to a Enum then calls the next processor in the chain.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and 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.
      • Methods inherited from class java.lang.Object

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

      • ParseEnum

        public ParseEnum(java.lang.Class<T> enumClass)
        Constructs a new ParseEnum processor, which converts a String to a Enum.
        Parameters:
        enumClass - the enum class to convert to
        Throws:
        java.lang.NullPointerException - if enumClass is null
      • ParseEnum

        public ParseEnum(java.lang.Class<T> enumClass,
                         boolean ignoreCase)
        Constructs a new ParseEnum processor, which converts a String to a Enum, ignoring the case of the input (or not) depending on the supplied flag.
        Parameters:
        enumClass - the enum class to convert to
        ignoreCase - whether to ignore the case of the input
        Throws:
        java.lang.NullPointerException - if enumClass is null
      • ParseEnum

        public ParseEnum(java.lang.Class<T> enumClass,
                         CellProcessor next)
        Constructs a new ParseEnum processor, which converts a String to a Enum then calls the next processor in the chain.
        Parameters:
        enumClass - the enum class to convert to
        next - the next processor in the chain
        Throws:
        java.lang.NullPointerException - if enumClass or next is null
      • ParseEnum

        public ParseEnum(java.lang.Class<T> enumClass,
                         boolean ignoreCase,
                         CellProcessor next)
        Constructs a new ParseEnum processor, which converts a String to a Enum, ignoring the case of the input (or not) depending on the supplied flag, then calls the next processor in the chain.
        Parameters:
        enumClass - the enum class to convert to
        ignoreCase - whether to ignore the case of the input
        next - the next processor in the chain
        Throws:
        java.lang.NullPointerException - if enumClass or next is null
    • 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 interface CellProcessor
        Throws:
        SuperCsvCellProcessorException - if value is null or can't be parsed as an Enum

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.