Package org.apache.cassandra.db
Enum Class ClusteringPrefix.Kind
- All Implemented Interfaces:
Serializable,Comparable<ClusteringPrefix.Kind>,Constable
- Enclosing interface:
- ClusteringPrefix<V>
The kind of clustering prefix this actually is.
The kind
STATIC_CLUSTERING is only implemented by Clustering.STATIC_CLUSTERING and CLUSTERING is
implemented by the Clustering class. The rest is used by ClusteringBound and ClusteringBoundary.-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Field Summary
FieldsModifier and TypeFieldDescriptionfinal intReturn the comparison of this kind to CLUSTERING. -
Method Summary
Modifier and TypeMethodDescriptionintcloseBoundOfBoundary(boolean reversed) static intCompares the 2 provided kind.invert()Returns the inverse of the current kind.booleanisBound()booleanbooleanisClose(boolean reversed) booleanisEnd()booleanisOpen(boolean reversed) booleanisStart()openBoundOfBoundary(boolean reversed) static ClusteringPrefix.KindReturns the enum constant of this class with the specified name.static ClusteringPrefix.Kind[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
EXCL_END_BOUND
-
INCL_START_BOUND
-
EXCL_END_INCL_START_BOUNDARY
-
STATIC_CLUSTERING
-
CLUSTERING
-
INCL_END_EXCL_START_BOUNDARY
-
INCL_END_BOUND
-
EXCL_START_BOUND
-
SSTABLE_LOWER_BOUND
-
SSTABLE_UPPER_BOUND
-
-
Field Details
-
comparedToClustering
public final int comparedToClusteringReturn the comparison of this kind to CLUSTERING. For bounds/boundaries, this basically tells us if we sort before or after our clustering values. -
asByteComparable
-
-
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
-
compare
Compares the 2 provided kind.Note: this should be used instead of
Enum.compareTo(E)when comparing clustering prefixes. We do not override that latter method because it is final for an enum. -
invert
Returns the inverse of the current kind.This invert both start into end (and vice-versa) and inclusive into exclusive (and vice-versa).
- Returns:
- the invert of this kind. For instance, if this kind is an exlusive start, this return an inclusive end.
-
isBound
public boolean isBound() -
isBoundary
public boolean isBoundary() -
isStart
public boolean isStart() -
isEnd
public boolean isEnd() -
isOpen
public boolean isOpen(boolean reversed) -
isClose
public boolean isClose(boolean reversed) -
closeBoundOfBoundary
-
openBoundOfBoundary
-
asByteComparableValue
-