public static enum Interval.Kind extends java.lang.Enum<Interval.Kind>
Interval
class how it should alter the behavior of its methods.
There are four different behaviors defined in this enum. The behaviors of each only differ slightly. They all operate on the ends of an interval, whether it be the lesser end, the greater end or a combination thereof.
A closed end will take into account the lesser or greater value itself. An open end, on the other hand, will not.
You can think of closed as inclusive and open as exclusive.
Enum Constant and Description |
---|
CLOSED_CLOSED
This
Kind represents the behavior of an interval with both ends closed. |
CLOSED_OPEN
This
Kind represents the behavior of an interval with its lesser end closed and its greater end open. |
OPEN_CLOSED
This
Kind represents the behavior of an interval with its lesser end open and its greater end closed. |
OPEN_OPEN
This
Kind represents the behavior of an interval with both ends open. |
Modifier and Type | Method and Description |
---|---|
static Interval.Kind |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static Interval.Kind[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Interval.Kind CLOSED_CLOSED
Kind
represents the behavior of an interval with both ends closed.public static final Interval.Kind CLOSED_OPEN
Kind
represents the behavior of an interval with its lesser end closed and its greater end open.public static final Interval.Kind OPEN_CLOSED
Kind
represents the behavior of an interval with its lesser end open and its greater end closed.public static final Interval.Kind OPEN_OPEN
Kind
represents the behavior of an interval with both ends open.public static Interval.Kind[] values()
for (Interval.Kind c : Interval.Kind.values()) System.out.println(c);
public static Interval.Kind 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