Enum Class ClusteringPrefix.Kind

java.lang.Object
java.lang.Enum<ClusteringPrefix.Kind>
org.apache.cassandra.db.ClusteringPrefix.Kind
All Implemented Interfaces:
Serializable, Comparable<ClusteringPrefix.Kind>, Constable
Enclosing interface:
ClusteringPrefix<V>

public static enum ClusteringPrefix.Kind extends Enum<ClusteringPrefix.Kind>
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.
  • Enum Constant Details

  • Field Details

    • comparedToClustering

      public final int comparedToClustering
      Return the comparison of this kind to CLUSTERING. For bounds/boundaries, this basically tells us if we sort before or after our clustering values.
    • asByteComparable

      public final ToIntFunction<ByteComparable.Version> asByteComparable
  • Method Details

    • values

      public static ClusteringPrefix.Kind[] 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

      public static ClusteringPrefix.Kind valueOf(String name)
      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 name
      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)
    • asByteComparableValue

      public int asByteComparableValue(ByteComparable.Version version)