Class/Object

org.threeten.bp.format.internal

TTBPDateTimeParseContext

Related Docs: object TTBPDateTimeParseContext | package internal

Permalink

final class TTBPDateTimeParseContext extends AnyRef

Context object used during date and time parsing.

This class represents the current state of the parse. It has the ability to store and retrieve the parsed values and manage optional segments. It also provides key information to the parsing methods.

Once parsing is complete, the #toBuilder() is typically used to obtain a builder that can combine the separate parsed fields into meaningful values.

Specification for implementors

This class is a mutable context intended for use from a single thread. Usage of the class is thread-safe within standard parsing as a new instance of this class is automatically created for each parse and parsing is single-threaded

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. TTBPDateTimeParseContext
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new TTBPDateTimeParseContext(other: TTBPDateTimeParseContext)

    Permalink
  2. new TTBPDateTimeParseContext(locale: Locale, symbols: DecimalStyle, chronology: Chronology)

    Permalink
  3. new TTBPDateTimeParseContext(formatter: DateTimeFormatter)

    Permalink

    Creates a new instance of the context.

    Creates a new instance of the context.

    formatter

    the formatter controlling the parse, not null

  4. new TTBPDateTimeParseContext(locale: Locale, symbols: DecimalStyle, overrideChronology: Chronology, overrideZone: ZoneId, caseSensitive: Boolean = true, strict: Boolean = true)

    Permalink

Type Members

  1. final class Parsed extends TemporalAccessor

    Permalink

    Temporary store of parsed data.

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. def addChronologyChangedParser(reducedPrinterParser: ReducedPrinterParser, value: Long, errorPos: Int, successPos: Int): Unit

    Permalink
  5. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  6. def charEquals(ch1: Char, ch2: Char): Boolean

    Permalink

    Helper to compare two char.

    Helper to compare two char. This uses #isCaseSensitive().

    ch1

    the first character

    ch2

    the second character

    returns

    true if equal

  7. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. def copy: TTBPDateTimeParseContext

    Permalink

    Creates a copy of this context.

  9. def endOptional(successful: Boolean): Unit

    Permalink

    Ends the parsing of an optional segment of the input.

    Ends the parsing of an optional segment of the input.

    successful

    whether the optional segment was successfully parsed

  10. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  11. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  12. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  13. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  14. def getEffectiveChronology: Chronology

    Permalink

    Gets the effective chronology during parsing.

    Gets the effective chronology during parsing.

    returns

    the effective parsing chronology, not null

  15. def getLocale: Locale

    Permalink

    Gets the locale.

    Gets the locale.

    This locale is used to control localization in the parse except where localization is controlled by the symbols.

    returns

    the locale, not null

  16. def getParsed(field: TemporalField): Long

    Permalink

    Gets the first value that was parsed for the specified field.

    Gets the first value that was parsed for the specified field.

    This searches the results of the parse, returning the first value found for the specified field. No attempt is made to derive a value. The field may have an out of range value. For example, the day-of-month might be set to 50, or the hour to 1000.

    field

    the field to query from the map, null returns null

    returns

    the value mapped to the specified field, null if field was not parsed

  17. def getSymbols: DecimalStyle

    Permalink

    Gets the formatting symbols.

    Gets the formatting symbols.

    The symbols control the localization of numeric parsing.

    returns

    the formatting symbols, not null

  18. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  19. def isCaseSensitive: Boolean

    Permalink

    Checks if parsing is case sensitive.

    Checks if parsing is case sensitive.

    returns

    true if parsing is case sensitive, false if case insensitive

  20. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  21. def isStrict: Boolean

    Permalink

    Checks if parsing is strict.

    Checks if parsing is strict.

    Strict parsing requires exact matching of the text and sign styles.

    returns

    true if parsing is strict, false if lenient

  22. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  23. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  24. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  25. def setCaseSensitive(caseSensitive: Boolean): Unit

    Permalink

    Sets whether the parsing is case sensitive or not.

    Sets whether the parsing is case sensitive or not.

    caseSensitive

    changes the parsing to be case sensitive or not from now on

  26. def setLocale(locale: Locale): Unit

    Permalink

    Sets the locale.

    Sets the locale.

    This locale is used to control localization in the print output except where localization is controlled by the symbols.

    locale

    the locale, not null

  27. def setParsed(zone: ZoneId): Unit

    Permalink

    Stores the parsed zone.

    Stores the parsed zone.

    This stores the zone that has been parsed. No validation is performed other than ensuring it is not null.

    zone

    the parsed zone, not null

  28. def setParsed(chrono: Chronology): Unit

    Permalink

    Stores the parsed chronology.

    Stores the parsed chronology.

    This stores the chronology that has been parsed. No validation is performed other than ensuring it is not null.

    chrono

    the parsed chronology, not null

  29. def setParsedField(field: TemporalField, value: Long, errorPos: Int, successPos: Int): Int

    Permalink

    Stores the parsed field.

    Stores the parsed field.

    This stores a field-value pair that has been parsed. The value stored may be out of range for the field - no checks are performed.

    field

    the field to set in the field-value map, not null

    value

    the value to set in the field-value map

    errorPos

    the position of the field being parsed

    successPos

    the position after the field being parsed

    returns

    the new position

  30. def setParsedLeapSecond(): Unit

    Permalink

    Stores the leap second.

  31. def setStrict(strict: Boolean): Unit

    Permalink

    Sets whether parsing is strict or lenient.

    Sets whether parsing is strict or lenient.

    strict

    changes the parsing to be strict or lenient from now on

  32. def startOptional(): Unit

    Permalink

    Starts the parsing of an optional segment of the input.

  33. def subSequenceEquals(cs1: CharSequence, offset1: Int, cs2: CharSequence, offset2: Int, length: Int): Boolean

    Permalink

    Helper to compare two CharSequence instances.

    Helper to compare two CharSequence instances. This uses #isCaseSensitive().

    cs1

    the first character sequence, not null

    offset1

    the offset into the first sequence, valid

    cs2

    the second character sequence, not null

    offset2

    the offset into the second sequence, valid

    length

    the length to check, valid

    returns

    true if equal

  34. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  35. def toParsed: Parsed

    Permalink

    Returns a TemporalAccessor that can be used to interpret the results of the parse.

    Returns a TemporalAccessor that can be used to interpret the results of the parse.

    returns

    an accessor with the results of the parse, not null

  36. def toString(): String

    Permalink

    Returns a string version of the context for debugging.

    Returns a string version of the context for debugging.

    returns

    a string representation of the context data, not null

    Definition Classes
    TTBPDateTimeParseContext → AnyRef → Any
  37. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  38. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  39. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped