T - public class ChoiceCoder<T> extends AbstractCoder<T>
| Constructor and Description |
|---|
ChoiceCoder(Collection<T> choices) |
ChoiceCoder(T... values) |
| Modifier and Type | Method and Description |
|---|---|
int |
codeLength()
Returns the length of output vector produced by this encoder
|
mikera.vectorz.AVector |
createOutputVector()
Create a new vector with a length necessary to store the output of this encoder
|
T |
decode(mikera.vectorz.AVector v,
int offset)
Decodes an object from the given vector
|
void |
encode(T object,
mikera.vectorz.AVector dest,
int offset)
Encodes an object into the given destination vector
|
List<?> |
getChoiceList() |
decode, encode, encodepublic ChoiceCoder(Collection<T> choices)
public ChoiceCoder(T... values)
public int codeLength()
IEncodercodeLength in interface IDecoder<T>codeLength in interface IEncoder<T>codeLength in class AbstractCoder<T>public T decode(mikera.vectorz.AVector v, int offset)
IDecoderpublic void encode(T object, mikera.vectorz.AVector dest, int offset)
IEncoderpublic List<?> getChoiceList()
public mikera.vectorz.AVector createOutputVector()
IEncodercreateOutputVector in interface IEncoder<T>createOutputVector in class AbstractCoder<T>Copyright © 2014. All rights reserved.