org.apache.cassandra.db.composites

## Class CompoundSparseCellNameType.WithCollection

- java.lang.Object
- - org.apache.cassandra.db.composites.AbstractCType
  - - org.apache.cassandra.db.composites.AbstractCellNameType
    - - org.apache.cassandra.db.composites.AbstractCompoundCellNameType
      - - org.apache.cassandra.db.composites.CompoundSparseCellNameType
        - - org.apache.cassandra.db.composites.CompoundSparseCellNameType.WithCollection

All Implemented Interfaces:
  java.util.Comparator<Composite>, CellNameType, CType

Enclosing class:
  CompoundSparseCellNameType

    public static class CompoundSparseCellNameType.WithCollection
    extends CompoundSparseCellNameType

### Nested Class Summary

### Nested classes/interfaces inherited from class org.apache.cassandra.db.composites.CompoundSparseCellNameType

`CompoundSparseCellNameType.WithCollection`

### Nested classes/interfaces inherited from interface org.apache.cassandra.db.composites.CellNameType

`CellNameType.Deserializer`

### Nested classes/interfaces inherited from interface org.apache.cassandra.db.composites.CType

`CType.Serializer`

### Field Summary

### Fields inherited from class org.apache.cassandra.db.composites.CompoundSparseCellNameType

`internedIds, rowMarkerId`

### Fields inherited from class org.apache.cassandra.db.composites.AbstractCompoundCellNameType

`clusteringSize, clusteringType, fullSize, fullType`

### Fields inherited from class org.apache.cassandra.db.composites.AbstractCType

`isByteOrderComparable`

### Constructor Summary

Constructors
Constructor and Description
`WithCollection(java.util.List<AbstractType<?>> types, ColumnToCollectionType collectionType)`

### Method Summary

All Methods Instance Methods Concrete Methods
`CellNameType` `addOrUpdateCollection(ColumnIdentifier columnName, CollectionType newCollection)` Return the new type obtained by adding/updating to the new collection type for the provided column name to this type.
`ColumnToCollectionType` `collectionType()` The type of the collections (or null if the type does not have any non-frozen collections).
`int` `compare(Composite c1, Composite c2)`
`protected Composite` `copyAndMakeWith(java.nio.ByteBuffer[] components, int size, Composite.EOC eoc, boolean isStatic)`
`CellName` `create(Composite prefix, ColumnDefinition column, java.nio.ByteBuffer collectionElement)` Creates a new collection CellName given a clustering prefix, a CQL3 column and the collection element.
`boolean` `hasCollections()` Whether or not there is some collections defined in this type.
`protected Composite` `makeWith(java.nio.ByteBuffer[] components, int size, Composite.EOC eoc, boolean isStatic)`
`CellNameType` `setSubtype(int position, AbstractType<?> newType)` Returns a new CellNameType that is equivalent to this one but with one of the subtype replaced by the provided new type.

### Methods inherited from class org.apache.cassandra.db.composites.CompoundSparseCellNameType

`addCQL3Column, CQL3RowBuilder, create, idFor, isDense, makeCType, removeCQL3Column, rowMarker, staticPrefix, supportCollections`

### Methods inherited from class org.apache.cassandra.db.composites.AbstractCompoundCellNameType

`asAbstractType, builder, clusteringPrefixSize, fromByteBuffer, isCompound, makeCellName, newDeserializer, prefixBuilder, size, subtype`

### Methods inherited from class org.apache.cassandra.db.composites.AbstractCellNameType

`asymmetricColumnComparator, cellFromByteBuffer, cellSerializer, columnComparator, columnReverseComparator, columnSerializer, diskAtomFilterSerializer, make, makeCellName, makeDenseCQL3RowBuilder, makeSparseCQL3RowBuilder, namesQueryFilterSerializer, onDiskAtomComparator, onDiskAtomSerializer`

### Methods inherited from class org.apache.cassandra.db.composites.AbstractCType

`checkRemaining, deletionInfoSerializer, equals, getByteOrderAsymmetricColumnComparator, getByteOrderColumnComparator, getString, hashCode, indexComparator, indexReverseComparator, isByteOrderComparable, isCompatibleWith, rangeTombstoneSerializer, reverseComparator, serializer, sliceBytes, sliceQueryFilterSerializer, sliceSerializer, toString, validate`

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

`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

### Methods inherited from interface org.apache.cassandra.db.composites.CType

`deletionInfoSerializer, getString, indexComparator, indexReverseComparator, isCompatibleWith, rangeTombstoneSerializer, reverseComparator, serializer, sliceQueryFilterSerializer, sliceSerializer, validate`

### Methods inherited from interface java.util.Comparator

`comparing, comparing, comparingDouble, comparingInt, comparingLong, equals, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong`

### Constructor Detail

#### WithCollection

    public WithCollection(java.util.List<AbstractType<?>> types,
                          ColumnToCollectionType collectionType)

### Method Detail

#### setSubtype

    public CellNameType setSubtype(int position,
                                   AbstractType<?> newType)

Description copied from interface: `CellNameType`
Returns a new CellNameType that is equivalent to this one but with one of the subtype replaced by the provided new type.

Specified by:
  `setSubtype` in interface `CellNameType`
Specified by:
  `setSubtype` in interface `CType`
Overrides:
  `setSubtype` in class `CompoundSparseCellNameType`

#### addOrUpdateCollection

    public CellNameType addOrUpdateCollection(ColumnIdentifier columnName,
                                              CollectionType newCollection)

Description copied from interface: `CellNameType`
Return the new type obtained by adding/updating to the new collection type for the provided column name to this type.

Specified by:
  `addOrUpdateCollection` in interface `CellNameType`
Overrides:
  `addOrUpdateCollection` in class `CompoundSparseCellNameType`

#### create

    public CellName create(Composite prefix,
                           ColumnDefinition column,
                           java.nio.ByteBuffer collectionElement)

Description copied from interface: `CellNameType`
Creates a new collection CellName given a clustering prefix, a CQL3 column and the collection element.

Specified by:
  `create` in interface `CellNameType`
Overrides:
  `create` in class `AbstractCellNameType`

#### compare

    public int compare(Composite c1,
                       Composite c2)

Specified by:
  `compare` in interface `java.util.Comparator<Composite>`
Specified by:
  `compare` in interface `CType`
Overrides:
  `compare` in class `AbstractCType`

#### hasCollections

    public boolean hasCollections()

Description copied from interface: `CellNameType`
Whether or not there is some collections defined in this type.

Specified by:
  `hasCollections` in interface `CellNameType`
Overrides:
  `hasCollections` in class `AbstractCellNameType`

#### collectionType

    public ColumnToCollectionType collectionType()

Description copied from interface: `CellNameType`
The type of the collections (or null if the type does not have any non-frozen collections).

Specified by:
  `collectionType` in interface `CellNameType`
Overrides:
  `collectionType` in class `AbstractCellNameType`

#### makeWith

    protected Composite makeWith(java.nio.ByteBuffer[] components,
                                 int size,
                                 Composite.EOC eoc,
                                 boolean isStatic)

Overrides:
  `makeWith` in class `CompoundSparseCellNameType`

#### copyAndMakeWith

    protected Composite copyAndMakeWith(java.nio.ByteBuffer[] components,
                                        int size,
                                        Composite.EOC eoc,
                                        boolean isStatic)

Overrides:
  `copyAndMakeWith` in class `CompoundSparseCellNameType`