public enum BracketPolicy extends Enum<BracketPolicy>
Determines a suitable strategy for formatting the open or closed state of interval boundaries.
An open boundary will be printed as leading "(" or as trailing ")". A closed boundary will be printed as leading "[" or as trailing "]".
| Enum Constant and Description |
|---|
SHOW_ALWAYS
The brackets indicating the open or closed state of a boundary
will always be printed.
|
SHOW_NEVER
The brackets indicating the open or closed state of a boundary
will never be printed.
|
SHOW_WHEN_NON_STANDARD
The brackets indicating the open or closed state of a boundary
will be printed if the boundary state deviates from standard.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
display(ChronoInterval<?> interval)
Decides if to display the boundaries of given interval.
|
static BracketPolicy |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static BracketPolicy[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final BracketPolicy SHOW_WHEN_NON_STANDARD
The brackets indicating the open or closed state of a boundary will be printed if the boundary state deviates from standard.
This setting is the default. Calendrical intervals are closed by default. All other intervals are half-open (right-open). Infinite intervals are always printed with brackets.
public static final BracketPolicy SHOW_ALWAYS
The brackets indicating the open or closed state of a boundary will always be printed.
public static final BracketPolicy SHOW_NEVER
The brackets indicating the open or closed state of a boundary will never be printed.
public static BracketPolicy[] values()
for (BracketPolicy c : BracketPolicy.values()) System.out.println(c);
public static BracketPolicy valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic boolean display(ChronoInterval<?> interval)
Decides if to display the boundaries of given interval.
interval - interval whose boundaries are to be printed or nottrue if boundaries are displayed else falseCopyright © 2014–2018. All rights reserved.