org.apache.cassandra.serializers

## Class SetSerializer<T>

- java.lang.Object
- - org.apache.cassandra.serializers.CollectionSerializer<java.util.Set<T>>
  - - org.apache.cassandra.serializers.SetSerializer<T>

All Implemented Interfaces:
  TypeSerializer<java.util.Set<T>>

    public class SetSerializer<T>
    extends CollectionSerializer<java.util.Set<T>>

### Field Summary

Fields
`TypeSerializer<T>` `elements`

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`java.util.Set<T>` `deserializeForNativeProtocol(java.nio.ByteBuffer bytes, ProtocolVersion version)`
`int` `getElementCount(java.util.Set<T> value)`
`static <T> SetSerializer<T>` `getInstance(TypeSerializer<T> elements, java.util.Comparator<java.nio.ByteBuffer> elementComparator)`
`java.lang.Class<java.util.Set<T>>` `getType()`
`java.util.List<java.nio.ByteBuffer>` `serializeValues(java.util.Set<T> values)`
`java.lang.String` `toString(java.util.Set<T> value)`
`void` `validateForNativeProtocol(java.nio.ByteBuffer bytes, ProtocolVersion version)`

### Methods inherited from class org.apache.cassandra.serializers.CollectionSerializer

`deserialize, pack, readCollectionSize, readValue, serialize, sizeOfCollectionSize, sizeOfValue, validate, writeCollectionSize, writeValue`

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

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Methods inherited from interface org.apache.cassandra.serializers.TypeSerializer

`toCQLLiteral`

### Field Detail

#### elements

    public final TypeSerializer<T> elements

### Method Detail

#### getInstance

    public static <T> SetSerializer<T> getInstance(TypeSerializer<T> elements,
                                                   java.util.Comparator<java.nio.ByteBuffer> elementComparator)

#### serializeValues

    public java.util.List<java.nio.ByteBuffer> serializeValues(java.util.Set<T> values)

Specified by:
  `serializeValues` in class `CollectionSerializer<java.util.Set<T>>`

#### getElementCount

    public int getElementCount(java.util.Set<T> value)

Specified by:
  `getElementCount` in class `CollectionSerializer<java.util.Set<T>>`

#### validateForNativeProtocol

    public void validateForNativeProtocol(java.nio.ByteBuffer bytes,
                                          ProtocolVersion version)

Specified by:
  `validateForNativeProtocol` in class `CollectionSerializer<java.util.Set<T>>`

#### deserializeForNativeProtocol

    public java.util.Set<T> deserializeForNativeProtocol(java.nio.ByteBuffer bytes,
                                                         ProtocolVersion version)

Specified by:
  `deserializeForNativeProtocol` in class `CollectionSerializer<java.util.Set<T>>`

#### toString

    public java.lang.String toString(java.util.Set<T> value)

#### getType

    public java.lang.Class<java.util.Set<T>> getType()