org.apache.cassandra.cql3.restrictions

## Interface Restrictions

- All Superinterfaces:
    Restriction

      public interface Restrictions
      extends Restriction

  Sets of restrictions

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.util.Set<Restriction>` | `getRestrictions(ColumnDefinition columnDef)` Returns the restrictions applied to the specified column.
    `boolean` | `hasContains()` Checks if any of the underlying restrictions is a CONTAINS / CONTAINS KEY restriction.
    `boolean` | `hasIN()` Checks if any of the underlying restriction is an IN.
    `boolean` | `hasOnlyEqualityRestrictions()` Checks if all of the underlying restrictions are EQ or IN restrictions.
    `boolean` | `hasSlice()` Checks if any of the underlying restrictions is a slice.
    `boolean` | `isEmpty()` Checks if this `Restrictions` is empty or not.
    `int` | `size()` Returns the number of columns that have a restriction.

    - ### Methods inherited from interface org.apache.cassandra.cql3.restrictions.Restriction

      `addFunctionsTo, addRowFilterTo, getColumnDefs, getFirstColumn, getLastColumn, hasSupportingIndex, isOnToken`

- - ### Method Detail

    - #### getRestrictions

          java.util.Set<Restriction> getRestrictions(ColumnDefinition columnDef)

      Returns the restrictions applied to the specified column.
      Parameters:
        `columnDef` - the column definition
      Returns:
        the restrictions applied to the specified column

    - #### isEmpty

          boolean isEmpty()

      Checks if this `Restrictions` is empty or not.
      Returns:
        `true` if this `Restrictions` is empty, `false` otherwise.

    - #### size

          int size()

      Returns the number of columns that have a restriction.
      Returns:
        the number of columns that have a restriction.

    - #### hasIN

          boolean hasIN()

      Checks if any of the underlying restriction is an IN.
      Returns:
        `true` if any of the underlying restriction is an IN, `false` otherwise

    - #### hasContains

          boolean hasContains()

      Checks if any of the underlying restrictions is a CONTAINS / CONTAINS KEY restriction.
      Returns:
        `true` if any of the underlying restrictions is CONTAINS, `false` otherwise

    - #### hasSlice

          boolean hasSlice()

      Checks if any of the underlying restrictions is a slice.
      Returns:
        `true` if any of the underlying restrictions is a slice, `false` otherwise

    - #### hasOnlyEqualityRestrictions

          boolean hasOnlyEqualityRestrictions()

      Checks if all of the underlying restrictions are EQ or IN restrictions.
      Returns:
        `true` if all of the underlying restrictions are EQ or IN restrictions, `false` otherwise

Copyright © 2018 The Apache Software Foundation