Enum Class SignPolicy
- All Implemented Interfaces:
Serializable
,Comparable<SignPolicy>
,java.lang.constant.Constable
Determines a suitable strategy for handling numerical signs.
Note: Signs can usually only occur in ISO-8601-context. Therefore
Time4J will never process signs in a localized way. That means signs
are the ASCII-chars '+' and '-'. A sign precedes the
sequence of numerical digits. Localized formats of elements with signs
(for example in arab language) require a special ChronoPrinter
and ChronoParser
.
A parser will only pay attention to this configuration in strict mode.
- Author:
- Meno Hochschild
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionThe sign will always be printed.A sign will never be printed or accepted in parsing.A positive sign will be printed if the numerical amount has more digits than specified.A positive sign will never be printed, but a negative sign is always printed. -
Method Summary
Modifier and TypeMethodDescriptionstatic SignPolicy
Returns the enum constant of this class with the specified name.static SignPolicy[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.Methods inherited from class java.lang.Enum
compareTo, describeConstable, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
-
Enum Constant Details
-
SHOW_NEVER
A sign will never be printed or accepted in parsing.
This setting is the default.
-
SHOW_WHEN_NEGATIVE
A positive sign will never be printed, but a negative sign is always printed.
This setting is the default for proleptic years in ISO-8601 format if the year numbers have less than four, but not two digits.
-
SHOW_WHEN_BIG_NUMBER
A positive sign will be printed if the numerical amount has more digits than specified.
This setting is the default for proleptic years in ISO-8601-format if the year numbers have more than four digits. Negative signs will always be printed.
-
SHOW_ALWAYS
The sign will always be printed.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-