Package org.threeten.bp.format
Enum DateTimeFormatterBuilder.SettingsParser
- java.lang.Object
-
- java.lang.Enum<DateTimeFormatterBuilder.SettingsParser>
-
- org.threeten.bp.format.DateTimeFormatterBuilder.SettingsParser
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<DateTimeFormatterBuilder.SettingsParser>,DateTimeFormatterBuilder.DateTimePrinterParser
- Enclosing class:
- DateTimeFormatterBuilder
static enum DateTimeFormatterBuilder.SettingsParser extends java.lang.Enum<DateTimeFormatterBuilder.SettingsParser> implements DateTimeFormatterBuilder.DateTimePrinterParser
Enumeration to apply simple parse settings.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description INSENSITIVELENIENTSENSITIVESTRICT
-
Constructor Summary
Constructors Modifier Constructor Description privateSettingsParser()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description intparse(DateTimeParseContext context, java.lang.CharSequence text, int position)Parses text into date-time information.booleanprint(DateTimePrintContext context, java.lang.StringBuilder buf)Prints the date-time object to the buffer.java.lang.StringtoString()static DateTimeFormatterBuilder.SettingsParservalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static DateTimeFormatterBuilder.SettingsParser[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
SENSITIVE
public static final DateTimeFormatterBuilder.SettingsParser SENSITIVE
-
INSENSITIVE
public static final DateTimeFormatterBuilder.SettingsParser INSENSITIVE
-
STRICT
public static final DateTimeFormatterBuilder.SettingsParser STRICT
-
LENIENT
public static final DateTimeFormatterBuilder.SettingsParser LENIENT
-
-
Method Detail
-
values
public static DateTimeFormatterBuilder.SettingsParser[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (DateTimeFormatterBuilder.SettingsParser c : DateTimeFormatterBuilder.SettingsParser.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static DateTimeFormatterBuilder.SettingsParser valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException- if this enum type has no constant with the specified namejava.lang.NullPointerException- if the argument is null
-
print
public boolean print(DateTimePrintContext context, java.lang.StringBuilder buf)
Description copied from interface:DateTimeFormatterBuilder.DateTimePrinterParserPrints the date-time object to the buffer.The context holds information to use during the print. It also contains the date-time information to be printed.
The buffer must not be mutated beyond the content controlled by the implementation.
- Specified by:
printin interfaceDateTimeFormatterBuilder.DateTimePrinterParser- Parameters:
context- the context to print using, not nullbuf- the buffer to append to, not null- Returns:
- false if unable to query the value from the date-time, true otherwise
-
parse
public int parse(DateTimeParseContext context, java.lang.CharSequence text, int position)
Description copied from interface:DateTimeFormatterBuilder.DateTimePrinterParserParses text into date-time information.The context holds information to use during the parse. It is also used to store the parsed date-time information.
- Specified by:
parsein interfaceDateTimeFormatterBuilder.DateTimePrinterParser- Parameters:
context- the context to use and parse into, not nulltext- the input text to parse, not nullposition- the position to start parsing at, from 0 to the text length- Returns:
- the new parse position, where negative means an error with the error position encoded using the complement ~ operator
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Enum<DateTimeFormatterBuilder.SettingsParser>
-
-