Class ParseLocalDateTime

  • All Implemented Interfaces:
    CellProcessor, StringCellProcessor

    public class ParseLocalDateTime
    extends AbstractTemporalAccessorParsingProcessor<java.time.LocalDateTime>
    Converts a String to a LocalDateTime. For constructors using DateTimeFormatter, refer to the following classes:
    • DateTimeFormatter - formats by pattern and style
    • DateTimeFormatter - ISO 8601 formats
    • DateTimeFormatterBuilder - complex formats created via method calls
    Since:
    2.4.0
    • Constructor Summary

      Constructors 
      Constructor Description
      ParseLocalDateTime()
      Constructs a new ParseLocalDateTime processor, which parses a String as a LocalDateTime, using LocalDateTime.parse(CharSequence).
      ParseLocalDateTime​(java.time.format.DateTimeFormatter formatter)
      Constructs a new ParseLocalDateTime processor, which parses a String as a LocalDateTime using the supplied formatter.
      ParseLocalDateTime​(java.time.format.DateTimeFormatter formatter, CellProcessor next)
      Constructs a new ParseLocalDateTime processor, which parses a String as a LocalDateTime using the supplied formatter, then calls the next processor in the chain.
      ParseLocalDateTime​(CellProcessor next)
      Constructs a new ParseLocalDateTime processor, which parses a String as a LocalDateTime, then calls the next processor in the chain.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected java.time.LocalDateTime parse​(java.lang.String string)
      Parses the String into the appropriate TemporalAccessor type.
      protected java.time.LocalDateTime parse​(java.lang.String string, java.time.format.DateTimeFormatter formatter)
      Parses the String into the appropriate TemporalAccessor type, using the supplied formatter.
      • Methods inherited from class java.lang.Object

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

      • ParseLocalDateTime

        public ParseLocalDateTime()
        Constructs a new ParseLocalDateTime processor, which parses a String as a LocalDateTime, using LocalDateTime.parse(CharSequence).
      • ParseLocalDateTime

        public ParseLocalDateTime​(CellProcessor next)
        Constructs a new ParseLocalDateTime processor, which parses a String as a LocalDateTime, then calls the next processor in the chain.
        Parameters:
        next - the next processor in the chain
        Throws:
        java.lang.NullPointerException - if next is null
      • ParseLocalDateTime

        public ParseLocalDateTime​(java.time.format.DateTimeFormatter formatter)
        Constructs a new ParseLocalDateTime processor, which parses a String as a LocalDateTime using the supplied formatter.
        Parameters:
        formatter - the formatter used for parsing
        Throws:
        java.lang.NullPointerException - if formatter is null
      • ParseLocalDateTime

        public ParseLocalDateTime​(java.time.format.DateTimeFormatter formatter,
                                  CellProcessor next)
        Constructs a new ParseLocalDateTime processor, which parses a String as a LocalDateTime using the supplied formatter, then calls the next processor in the chain.
        Parameters:
        formatter - the formatter used for parsing
        next - the next processor in the chain
        Throws:
        java.lang.NullPointerException - if formatter or next is null
    • Method Detail

      • parse

        protected java.time.LocalDateTime parse​(java.lang.String string)
        Parses the String into the appropriate TemporalAccessor type.
        Specified by:
        parse in class AbstractTemporalAccessorParsingProcessor<java.time.LocalDateTime>
        Parameters:
        string - the string to parse
        Returns:
        the TemporalAccessor type
      • parse

        protected java.time.LocalDateTime parse​(java.lang.String string,
                                                java.time.format.DateTimeFormatter formatter)
        Parses the String into the appropriate TemporalAccessor type, using the supplied formatter.
        Specified by:
        parse in class AbstractTemporalAccessorParsingProcessor<java.time.LocalDateTime>
        Parameters:
        string - the string to parse
        formatter - the formatter to use
        Returns:
        the TemporalAccessor type