|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Value
The interface of an index value type.
Classes that implement this interface have to override the methods
Object.hashCode()
and Object.equals(Object)
as well.
Nested Class Summary | |
---|---|
static class |
Value.Check
|
static class |
Value.InvalidArgumentException
|
Field Summary | |
---|---|
static char |
SEPARATOR
|
Method Summary | |
---|---|
int |
byteSize()
Returns the serialized size of this value. |
TokenStream |
parseFrom(TokenStream input)
Parses all elements from a TokenStream . |
java.io.PrintStream |
printTo(java.io.PrintStream output)
Prints all elements to a . |
java.io.PrintWriter |
printTo(java.io.PrintWriter output)
Prints all elements to a . |
void |
toBytes(java.nio.ByteBuffer buffer)
Serializes all elements into a ByteBuffer . |
void |
wrap(java.nio.ByteBuffer buffer)
Deserializes the value from a ByteBuffer . |
Field Detail |
---|
static final char SEPARATOR
Method Detail |
---|
TokenStream parseFrom(TokenStream input) throws java.io.IOException
TokenStream
.
input
- the token stream to read the value from.
java.io.IOException
java.io.PrintWriter printTo(java.io.PrintWriter output)
#toString()
, but for serialization purposes this method is
much faster since no temporal variables are needed.
output
- the print writer to write the value to.
java.io.PrintStream printTo(java.io.PrintStream output)
#toString()
, but for serialization purposes this method is
much faster since no temporal variables are needed.
output
- the print stream to write the value to.
int byteSize()
ByteBuffer
when calling toBytes(ByteBuffer)
.
wrap(ByteBuffer)
,
toBytes(ByteBuffer)
void toBytes(java.nio.ByteBuffer buffer)
ByteBuffer
.
Note that the given buffer has the correct ByteOrder
,
which is by default, but has to be
ByteOrder.LITTLE_ENDIAN
on Intel machines because of JNI.
TODO check automatic buffer resizing if possible ...
otherwise there has to be a precondition: buffer.capacity() >= size()
buffer
- a byte buffer to serialize the value to.wrap(ByteBuffer)
void wrap(java.nio.ByteBuffer buffer)
ByteBuffer
.
All elements of this value are read from the current get position.
buffer
- a byte buffer that contains all elements of this value.toBytes(ByteBuffer)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |