Package com.google.common.collect
Class Cut<C extends Comparable>
java.lang.Object
com.google.common.collect.Cut<C>
- All Implemented Interfaces:
Serializable
,Comparable<Cut<C>>
- Direct Known Subclasses:
Cut.AboveAll
,Cut.AboveValue
,Cut.BelowAll
,Cut.BelowValue
Implementation detail for the internal structure of
Range
instances. Represents a unique
way of "cutting" a "number line" (actually of instances of type C
, not necessarily
"numbers") into two sections; this can be done below a certain value, above a certain value,
below all values or above all values. With this object defined in this way, an interval can
always be represented by a pair of Cut
instances.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static final class
private static final class
Cut.AboveValue<C extends Comparable>
private static final class
private static final class
Cut.BelowValue<C extends Comparable>
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) static <C extends Comparable>
Cut<C> aboveAll()
(package private) static <C extends Comparable>
Cut<C> aboveValue
(C endpoint) (package private) static <C extends Comparable>
Cut<C> belowAll()
(package private) static <C extends Comparable>
Cut<C> belowValue
(C endpoint) canonical
(DiscreteDomain<C> domain) int
(package private) abstract void
(package private) abstract void
(package private) C
endpoint()
boolean
(package private) abstract C
greatestValueBelow
(DiscreteDomain<C> domain) abstract int
hashCode()
(package private) abstract boolean
isLessThan
(C value) (package private) abstract C
leastValueAbove
(DiscreteDomain<C> domain) (package private) abstract BoundType
(package private) abstract BoundType
withLowerBoundType
(BoundType boundType, DiscreteDomain<C> domain) withUpperBoundType
(BoundType boundType, DiscreteDomain<C> domain)
-
Field Details
-
endpoint
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
-
Constructor Details
-
Cut
Cut(C endpoint)
-
-
Method Details
-
isLessThan
-
typeAsLowerBound
-
typeAsUpperBound
-
withLowerBoundType
-
withUpperBoundType
-
describeAsLowerBound
-
describeAsUpperBound
-
leastValueAbove
-
greatestValueBelow
-
canonical
-
compareTo
- Specified by:
compareTo
in interfaceComparable<C extends Comparable>
-
endpoint
C endpoint() -
equals
-
hashCode
public abstract int hashCode() -
belowAll
-
aboveAll
-
belowValue
-
aboveValue
-