Enum Class BracketPolicy
- All Implemented Interfaces:
Serializable
,Comparable<BracketPolicy>
,java.lang.constant.Constable
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 "]".
- Since:
- 2.0
- 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 brackets indicating the open or closed state of a boundary will always be printed.The brackets indicating the open or closed state of a boundary will never be printed.The brackets indicating the open or closed state of a boundary will be printed if the boundary state deviates from standard. -
Method Summary
Modifier and TypeMethodDescriptionboolean
display(ChronoInterval<?> interval)
Decides if to display the boundaries of given interval.static BracketPolicy
Returns the enum constant of this class with the specified name.static BracketPolicy[]
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_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.
-
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.
-
-
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
-
display
Decides if to display the boundaries of given interval.
- Parameters:
interval
- interval whose boundaries are to be printed or not- Returns:
true
if boundaries are displayed elsefalse
- Since:
- 2.0
-