public enum SignPolicy extends java.lang.Enum<SignPolicy>
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.
| Enum Constant and Description |
|---|
SHOW_ALWAYS
The sign will always be printed.
|
SHOW_NEVER
A sign will never be printed or accepted in parsing.
|
SHOW_WHEN_BIG_NUMBER
A positive sign will be printed if the numerical amount has more
digits than specified.
|
SHOW_WHEN_NEGATIVE
A positive sign will never be printed, but a negative sign is
always printed.
|
| Modifier and Type | Method and Description |
|---|---|
static SignPolicy |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static SignPolicy[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final SignPolicy SHOW_NEVER
A sign will never be printed or accepted in parsing.
This setting is the default.
public static final SignPolicy 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.
public static final SignPolicy 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.
public static final SignPolicy SHOW_ALWAYS
The sign will always be printed.
public static SignPolicy[] values()
for (SignPolicy c : SignPolicy.values()) System.out.println(c);
public static SignPolicy valueOf(java.lang.String name)
name - the name of the enum constant to be returned.java.lang.IllegalArgumentException - if this enum type has no constant with the specified namejava.lang.NullPointerException - if the argument is null