ClusteringPrefix.Kind (apache-cassandra API)
Date: 2018-02-14

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

      public static enum ClusteringPrefix.Kind
      extends java.lang.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 Summary

    Enum Constants
    Enum Constant and Description
    `CLUSTERING`
    `EXCL_END_BOUND`
    `EXCL_END_INCL_START_BOUNDARY`
    `EXCL_START_BOUND`
    `INCL_END_BOUND`
    `INCL_END_EXCL_START_BOUNDARY`
    `INCL_START_BOUND`
    `STATIC_CLUSTERING`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `int` | `comparedToClustering` Return the comparison of this kind to CLUSTERING.

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `ClusteringPrefix.Kind` | `closeBoundOfBoundary(boolean reversed)`
    `static int` | `compare(ClusteringPrefix.Kind k1, ClusteringPrefix.Kind k2)` Compares the 2 provided kind.
    `ClusteringPrefix.Kind` | `invert()` Returns the inverse of the current kind.
    `boolean` | `isBound()`
    `boolean` | `isBoundary()`
    `boolean` | `isClose(boolean reversed)`
    `boolean` | `isEnd()`
    `boolean` | `isOpen(boolean reversed)`
    `boolean` | `isStart()`
    `ClusteringPrefix.Kind` | `openBoundOfBoundary(boolean reversed)`
    `static ClusteringPrefix.Kind` | `valueOf(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.

    - ### Methods inherited from class java.lang.Enum

      `clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

    - ### Methods inherited from class java.lang.Object

      `getClass, notify, notifyAll, wait, wait, wait`

- - ### 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

  - ### Field Detail

    - #### 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.

  - ### 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 name
        `java.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)

Copyright © 2018 The Apache Software Foundation