Package org.apache.cassandra.db
Enum ClusteringPrefix.Kind
- java.lang.Object
-
- java.lang.Enum<ClusteringPrefix.Kind>
-
- org.apache.cassandra.db.ClusteringPrefix.Kind
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<ClusteringPrefix.Kind>
- Enclosing interface:
- ClusteringPrefix<V>
public static enum ClusteringPrefix.Kind extends java.lang.Enum<ClusteringPrefix.Kind>
The kind of clustering prefix this actually is. The kindSTATIC_CLUSTERINGis only implemented byClustering.STATIC_CLUSTERINGandCLUSTERINGis implemented by theClusteringclass. The rest is used byClusteringBoundandClusteringBoundary.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description CLUSTERINGEXCL_END_BOUNDEXCL_END_INCL_START_BOUNDARYEXCL_START_BOUNDINCL_END_BOUNDINCL_END_EXCL_START_BOUNDARYINCL_START_BOUNDSTATIC_CLUSTERING
-
Field Summary
Fields Modifier and Type Field Description intcomparedToClusteringReturn the comparison of this kind to CLUSTERING.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ClusteringPrefix.KindcloseBoundOfBoundary(boolean reversed)static intcompare(ClusteringPrefix.Kind k1, ClusteringPrefix.Kind k2)Compares the 2 provided kind.ClusteringPrefix.Kindinvert()Returns the inverse of the current kind.booleanisBound()booleanisBoundary()booleanisClose(boolean reversed)booleanisEnd()booleanisOpen(boolean reversed)booleanisStart()ClusteringPrefix.KindopenBoundOfBoundary(boolean reversed)static ClusteringPrefix.KindvalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static ClusteringPrefix.Kind[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
EXCL_END_BOUND
public static final ClusteringPrefix.Kind EXCL_END_BOUND
-
INCL_START_BOUND
public static final ClusteringPrefix.Kind INCL_START_BOUND
-
EXCL_END_INCL_START_BOUNDARY
public static final ClusteringPrefix.Kind EXCL_END_INCL_START_BOUNDARY
-
STATIC_CLUSTERING
public static final ClusteringPrefix.Kind STATIC_CLUSTERING
-
CLUSTERING
public static final ClusteringPrefix.Kind CLUSTERING
-
INCL_END_EXCL_START_BOUNDARY
public static final ClusteringPrefix.Kind INCL_END_EXCL_START_BOUNDARY
-
INCL_END_BOUND
public static final ClusteringPrefix.Kind INCL_END_BOUND
-
EXCL_START_BOUND
public static final ClusteringPrefix.Kind EXCL_START_BOUND
-
-
Method Detail
-
values
public static ClusteringPrefix.Kind[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (ClusteringPrefix.Kind c : ClusteringPrefix.Kind.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ClusteringPrefix.Kind valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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:
java.lang.IllegalArgumentException- if this enum type has no constant with the specified namejava.lang.NullPointerException- if the argument is null
-
compare
public static int compare(ClusteringPrefix.Kind k1, ClusteringPrefix.Kind k2)
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
public ClusteringPrefix.Kind 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
public ClusteringPrefix.Kind closeBoundOfBoundary(boolean reversed)
-
openBoundOfBoundary
public ClusteringPrefix.Kind openBoundOfBoundary(boolean reversed)
-
-