public class SetSerializer<T> extends CollectionSerializer<java.util.Set<T>>
Modifier and Type | Field and Description |
---|---|
TypeSerializer<T> |
elements |
Modifier and Type | Method and Description |
---|---|
java.util.Set<T> |
deserialize(java.nio.ByteBuffer bytes) |
static <T> SetSerializer<T> |
getInstance(TypeSerializer<T> elements) |
java.lang.Class<java.util.Set<T>> |
getType() |
java.nio.ByteBuffer |
serialize(java.util.Set<T> value)
Layout is:
<n><s_1><b_1>...<s_n><b_n>
where:
n is the number of elements
s_i is the number of bytes composing the ith element
b_i is the s_i bytes composing the ith element |
java.lang.String |
toString(java.util.Set<T> value) |
getUnsignedShort, pack, pack, validate
public final TypeSerializer<T> elements
public static <T> SetSerializer<T> getInstance(TypeSerializer<T> elements)
public java.util.Set<T> deserialize(java.nio.ByteBuffer bytes)
public java.nio.ByteBuffer serialize(java.util.Set<T> value)
<n><s_1><b_1>...<s_n><b_n>
where:
n is the number of elements
s_i is the number of bytes composing the ith element
b_i is the s_i bytes composing the ith elementpublic java.lang.String toString(java.util.Set<T> value)
public java.lang.Class<java.util.Set<T>> getType()
Copyright © 2014 The Apache Software Foundation