public final class UniqueValuesIntEncoder extends IntEncoderFilter
IntEncoderFilter
which ensures only unique values are encoded. The
implementation assumes the values given to encode(IntsRef, BytesRef)
are sorted.
If this is not the case, you can chain this encoder with
SortingIntEncoder
.encoder
Constructor and Description |
---|
UniqueValuesIntEncoder(IntEncoder encoder)
Constructs a new instance with the given encoder.
|
Modifier and Type | Method and Description |
---|---|
IntDecoder |
createMatchingDecoder()
Returns an
IntDecoder which can decode the values that were encoded
with this encoder. |
void |
encode(IntsRef values,
BytesRef buf)
Encodes the values to the given buffer.
|
String |
toString() |
public UniqueValuesIntEncoder(IntEncoder encoder)
public void encode(IntsRef values, BytesRef buf)
IntEncoder
encode
in class IntEncoder
public IntDecoder createMatchingDecoder()
IntEncoder
IntDecoder
which can decode the values that were encoded
with this encoder.createMatchingDecoder
in class IntEncoder
Copyright © 2000-2013 Apache Software Foundation. All Rights Reserved.