org.apache.cassandra.cql3.restrictions

## Interface Restriction

All Known Subinterfaces:
  Restrictions, SingleRestriction

All Known Implementing Classes:
  MultiColumnRestriction, MultiColumnRestriction.EQRestriction, MultiColumnRestriction.INRestriction, MultiColumnRestriction.InRestrictionWithMarker, MultiColumnRestriction.InRestrictionWithValues, MultiColumnRestriction.NotNullRestriction, MultiColumnRestriction.SliceRestriction, SingleColumnRestriction, SingleColumnRestriction.ContainsRestriction, SingleColumnRestriction.EQRestriction, SingleColumnRestriction.INRestriction, SingleColumnRestriction.InRestrictionWithMarker, SingleColumnRestriction.InRestrictionWithValues, SingleColumnRestriction.IsNotNullRestriction, SingleColumnRestriction.LikeRestriction, SingleColumnRestriction.SliceRestriction, SingleColumnRestriction.SuperColumnKeyEQRestriction, SingleColumnRestriction.SuperColumnKeyINRestriction, SingleColumnRestriction.SuperColumnKeyINRestrictionWithMarkers, SingleColumnRestriction.SuperColumnKeyINRestrictionWithValues, SingleColumnRestriction.SuperColumnKeySliceRestriction, SingleColumnRestriction.SuperColumnMultiEQRestriction, SingleColumnRestriction.SuperColumnMultiSliceRestriction

    public interface Restriction

Implementation of this class must be immutable.

### Method Summary

All Methods Instance Methods Abstract Methods Default Methods
`void` `addFunctionsTo(java.util.List<Function> functions)` Adds all functions (native and user-defined) used by any component of the restriction to the specified list.
`void` `addRowFilterTo(RowFilter filter, SecondaryIndexManager indexManager, QueryOptions options)` Adds to the specified row filter the expressions corresponding to this `Restriction`.
`java.util.List<ColumnDefinition>` `getColumnDefs()` Returns the column definitions in position order.
`ColumnDefinition` `getFirstColumn()` Returns the definition of the first column.
`ColumnDefinition` `getLastColumn()` Returns the definition of the last column.
`boolean` `hasSupportingIndex(SecondaryIndexManager indexManager)` Check if the restriction is on indexed columns.
`default boolean` `isOnToken()`

### Method Detail

#### isOnToken

    default boolean isOnToken()

#### getFirstColumn

    ColumnDefinition getFirstColumn()

Returns the definition of the first column.

Returns:
  the definition of the first column.

#### getLastColumn

    ColumnDefinition getLastColumn()

Returns the definition of the last column.

Returns:
  the definition of the last column.

#### getColumnDefs

    java.util.List<ColumnDefinition> getColumnDefs()

Returns the column definitions in position order.

Returns:
  the column definitions in position order.

#### addFunctionsTo

    void addFunctionsTo(java.util.List<Function> functions)

Adds all functions (native and user-defined) used by any component of the restriction to the specified list.

Parameters:
  `functions` - the list to add to

#### hasSupportingIndex

    boolean hasSupportingIndex(SecondaryIndexManager indexManager)

Check if the restriction is on indexed columns.

Parameters:
  `indexManager` - the index manager
Returns:
  `true` if the restriction is on indexed columns, `false`

#### addRowFilterTo

    void addRowFilterTo(RowFilter filter,
                        SecondaryIndexManager indexManager,
                        QueryOptions options)

Adds to the specified row filter the expressions corresponding to this `Restriction`.

Parameters:
  `filter` - the row filter to add expressions to
  `indexManager` - the secondary index manager
  `options` - the query options