Class FmtZoneId

java.lang.Object
org.supercsv.cellprocessor.CellProcessorAdaptor
org.supercsv.cellprocessor.time.FmtZoneId
All Implemented Interfaces:
CellProcessor

public class FmtZoneId extends CellProcessorAdaptor
Converts a ZoneId to a String. The format is the ID of the timezone, e.g. ('Europe/Vienna'), as defined by ZoneId.toString().
Since:
2.4.0
  • Field Details

    • textStyle

      private final TextStyle textStyle
    • locale

      private final Locale locale
  • Constructor Details

    • FmtZoneId

      public FmtZoneId()
      Constructs a new FmtZoneId processor, which formats a ZoneId as a String.
    • FmtZoneId

      public FmtZoneId(CellProcessor next)
      Constructs a new FmtZoneId processor, which formats a ZoneId as a String, then calls the next processor in the chain.
      Parameters:
      next - next processor in the chain
      Throws:
      NullPointerException - if next is null
    • FmtZoneId

      public FmtZoneId(TextStyle textStyle, Locale locale)
      Constructs a new FmtZoneId processor, which formats a ZoneId as String, then calls the next processor in the chain.
      Parameters:
      textStyle - the TextStyle to use for formatting
      locale - the Locale to use for formatting
      Throws:
      NullPointerException - if either textStyle or locale is null
    • FmtZoneId

      public FmtZoneId(TextStyle textStyle, Locale locale, CellProcessor next)
      Constructs a new FmtZoneId processor, which formats a ZoneId as String, then calls the next processor in the chain.
      Parameters:
      textStyle - the TextStyle to use for formatting
      locale - the Locale to use for formatting
      next - next processor in the chain
      Throws:
      NullPointerException - if any argument is null
  • 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.
      Parameters:
      value - the value to be processed
      context - the CSV context
      Returns:
      the result of cell processor execution
      Throws:
      SuperCsvCellProcessorException - if value is null or not a ZoneId