Interface TemporalField.DateTimeParser<T extends Temporal>

Type Parameters:
T - the Temporal type
Enclosing class:
TemporalField<T extends Temporal>

public static interface TemporalField.DateTimeParser<T extends Temporal>
Parses a Temporal value from text with a provided formatter
  • Method Summary

    Modifier and Type
    Method
    Description
    Parses the given text with the given formatter
  • Method Details

    • parse

      T parse(CharSequence text, DateTimeFormatter formatter)
      Parses the given text with the given formatter
      Parameters:
      text - the text to parse
      formatter - the formatter to use
      Returns:
      the Temporal value
      Throws:
      DateTimeParseException - if unable to parse the text