Package javax.time.calendar.format
Enum CaseSensitivePrinterParser
- java.lang.Object
-
- java.lang.Enum<CaseSensitivePrinterParser>
-
- javax.time.calendar.format.CaseSensitivePrinterParser
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<CaseSensitivePrinterParser>,DateTimeParser,DateTimePrinter
enum CaseSensitivePrinterParser extends java.lang.Enum<CaseSensitivePrinterParser> implements DateTimePrinter, DateTimeParser
Enumeration to set the case sensitivity parse style.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description INSENSITIVECase insensitive parsing.SENSITIVECase sensitive parsing.
-
Constructor Summary
Constructors Modifier Constructor Description privateCaseSensitivePrinterParser()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanisPrintDataAvailable(Calendrical calendrical)Checks if the calendrical contains the data necessary to be printed.intparse(DateTimeParseContext context, java.lang.String parseText, int position)Parses from the supplied text and position into the calendrical.voidprint(Calendrical calendrical, java.lang.Appendable appendable, DateTimeFormatSymbols symbols)Prints the calendrical object to the appendable.java.lang.StringtoString()static CaseSensitivePrinterParservalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static CaseSensitivePrinterParser[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
SENSITIVE
public static final CaseSensitivePrinterParser SENSITIVE
Case sensitive parsing.
-
INSENSITIVE
public static final CaseSensitivePrinterParser INSENSITIVE
Case insensitive parsing.
-
-
Method Detail
-
values
public static CaseSensitivePrinterParser[] 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 (CaseSensitivePrinterParser c : CaseSensitivePrinterParser.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static CaseSensitivePrinterParser 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
-
isPrintDataAvailable
public boolean isPrintDataAvailable(Calendrical calendrical)
Checks if the calendrical contains the data necessary to be printed.The implementation should not check the validity of the data, just whether there is sufficient data to attempt a print.
- Specified by:
isPrintDataAvailablein interfaceDateTimePrinter- Parameters:
calendrical- the calendrical to check, not null- Returns:
- true if the calendrical can be printed, false if not
-
print
public void print(Calendrical calendrical, java.lang.Appendable appendable, DateTimeFormatSymbols symbols) throws java.io.IOException
Prints the calendrical object to the appendable.- Specified by:
printin interfaceDateTimePrinter- Parameters:
calendrical- the calendrical to print, not nullappendable- the appendable to add to, not nullsymbols- the formatting symbols to use, not null- Throws:
java.io.IOException- if the append throws an exception
-
parse
public int parse(DateTimeParseContext context, java.lang.String parseText, int position)
Parses from the supplied text and position into the calendrical.- Specified by:
parsein interfaceDateTimeParser- Parameters:
context- the context to use and parse into, not nullparseText- 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<CaseSensitivePrinterParser>
-
-