Package generic
Enum Class ULongSpan.Domain
- All Implemented Interfaces:
Span.Domain<Long,
,ULongSpan> Serializable
,Comparable<ULongSpan.Domain>
,Constable
- Enclosing interface:
ULongSpan
public static enum ULongSpan.Domain
extends Enum<ULongSpan.Domain>
implements Span.Domain<Long,ULongSpan>
The domain of unsigned longs
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
-
Method Summary
Modifier and TypeMethodDescriptionall()
Get the span containing all values in the domainint
Compare two valuesGet a given value, decremented by 1empty()
Get the span that contains no value, nor has any endpointsGet a given value, incremented by 1max()
Get the maximum value in the domainmin()
Get the minimum value in the domainFactory method for a new span after arguments are validatedRender the given value as a stringstatic ULongSpan.Domain
Returns the enum constant of this class with the specified name.static ULongSpan.Domain[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.Methods inherited from class java.lang.Enum
clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
Methods inherited from interface generic.Span.Domain
atLeast, atMost, bound, closed, encloses, intersect, intersects, max, min, subtract, toMaxString, toMinString, toString, value
-
Enum Constant Details
-
INSTANCE
-
-
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
-
newSpan
Description copied from interface:Span.Domain
Factory method for a new span after arguments are validated- Specified by:
newSpan
in interfaceSpan.Domain<Long,
ULongSpan> - Parameters:
min
- the lower endpointmax
- the upper endpoint- Returns:
- the span
-
all
Description copied from interface:Span.Domain
Get the span containing all values in the domain- Specified by:
all
in interfaceSpan.Domain<Long,
ULongSpan> - Returns:
- the span
-
empty
Description copied from interface:Span.Domain
Get the span that contains no value, nor has any endpointsThis span is returned when the result doesn't exist, e.g., when finding the intersection of spans which do not intersect.
- Specified by:
empty
in interfaceSpan.Domain<Long,
ULongSpan> - Returns:
- the empty span
-
toString
Description copied from interface:Span.Domain
Render the given value as a string- Specified by:
toString
in interfaceSpan.Domain<Long,
ULongSpan> - Parameters:
n
- the value- Returns:
- the string
-
compare
Description copied from interface:Span.Domain
Compare two values- Specified by:
compare
in interfaceSpan.Domain<Long,
ULongSpan> - Parameters:
n1
- a valuen2
- another value- Returns:
- the result, as in
Comparator.compare(Object, Object)
-
min
Description copied from interface:Span.Domain
Get the minimum value in the domainThis value can also represent negative infinity.
- Specified by:
min
in interfaceSpan.Domain<Long,
ULongSpan> - Returns:
- the minimum value
-
max
Description copied from interface:Span.Domain
Get the maximum value in the domainThis value can also represent positive infinity.
- Specified by:
max
in interfaceSpan.Domain<Long,
ULongSpan> - Returns:
- the maximum value
-
inc
Description copied from interface:Span.Domain
Get a given value, incremented by 1If the resulting value would exceed
Span.Domain.max()
, this should wrap toSpan.Domain.min()
.- Specified by:
inc
in interfaceSpan.Domain<Long,
ULongSpan> - Parameters:
n
- the value- Returns:
- the value incremented
-
dec
Description copied from interface:Span.Domain
Get a given value, decremented by 1If the resulting value would exceed
Span.Domain.min()
, this should wrap toSpan.Domain.max()
.- Specified by:
dec
in interfaceSpan.Domain<Long,
ULongSpan> - Parameters:
n
- the value- Returns:
- the value decremented
-