Package org.supercsv.cellprocessor.time
Class ParseZoneId
- java.lang.Object
-
- org.supercsv.cellprocessor.CellProcessorAdaptor
-
- org.supercsv.cellprocessor.time.ParseZoneId
-
- All Implemented Interfaces:
CellProcessor
public class ParseZoneId extends CellProcessorAdaptor
Converts a String to a ZoneId.- Since:
- 2.4.0
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.Map<java.lang.String,java.lang.String>
aliasMap
-
Fields inherited from class org.supercsv.cellprocessor.CellProcessorAdaptor
next
-
-
Constructor Summary
Constructors Constructor Description ParseZoneId()
Constructs a new ParseZoneId processor, which parses a String recognized byZoneId.of(String)
as a ZoneId.ParseZoneId(java.util.Map<java.lang.String,java.lang.String> aliasMap)
Constructs a new ParseZoneId processor, which parses a String as a ZoneId using the supplied Zone ID mappings.ParseZoneId(java.util.Map<java.lang.String,java.lang.String> aliasMap, CellProcessor next)
Constructs a new ParseZoneId processor, which parses a String as a ZoneId using the supplied Zone ID mappings, then calls the next processor in the chain.ParseZoneId(CellProcessor next)
Constructs a new ParseZoneId processor, which parses a String as a ZoneId, then calls the next processor in the chain.
-
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.-
Methods inherited from class org.supercsv.cellprocessor.CellProcessorAdaptor
toString, validateInputNotNull
-
-
-
-
Constructor Detail
-
ParseZoneId
public ParseZoneId()
Constructs a new ParseZoneId processor, which parses a String recognized byZoneId.of(String)
as a ZoneId.
-
ParseZoneId
public ParseZoneId(CellProcessor next)
Constructs a new ParseZoneId processor, which parses a String as a ZoneId, then calls the next processor in the chain.- Parameters:
next
- the next processor in the chain- See Also:
ParseZoneId()
-
ParseZoneId
public ParseZoneId(java.util.Map<java.lang.String,java.lang.String> aliasMap)
Constructs a new ParseZoneId processor, which parses a String as a ZoneId using the supplied Zone ID mappings.- Parameters:
aliasMap
- a Map from custom zone IDs to canonical representations- See Also:
ZoneId.of(String, Map)
-
ParseZoneId
public ParseZoneId(java.util.Map<java.lang.String,java.lang.String> aliasMap, CellProcessor next)
Constructs a new ParseZoneId processor, which parses a String as a ZoneId using the supplied Zone ID mappings, then calls the next processor in the chain.- Parameters:
aliasMap
- a Map from custom zone IDs to canonical representationsnext
- the next processor in the chain- See Also:
ZoneId.of(String, Map)
-
-
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.- Parameters:
value
- the value to be processedcontext
- the CSV context- Returns:
- the result of cell processor execution
- Throws:
SuperCsvCellProcessorException
- if value is null or is not a String
-
-