|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.aitools.aq.invertedindex.value.pair.LongString
public class LongString
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface de.aitools.aq.invertedindex.value.Value |
---|
Value.Check, Value.InvalidArgumentException |
Field Summary |
---|
Fields inherited from interface de.aitools.aq.invertedindex.value.Value |
---|
SEPARATOR |
Constructor Summary | |
---|---|
LongString()
|
|
LongString(LongString pair)
|
|
LongString(long e1,
java.lang.String e2)
|
Method Summary | |
---|---|
int |
byteSize()
Returns the serialized size of this value. |
boolean |
equals(java.lang.Object obj)
|
long |
getE1()
|
java.lang.String |
getE2()
|
int |
hashCode()
|
TokenStream |
parseFrom(TokenStream in)
Parses all elements from a TokenStream . |
java.io.PrintStream |
printTo(java.io.PrintStream out)
Prints all elements to a . |
java.io.PrintWriter |
printTo(java.io.PrintWriter out)
Prints all elements to a . |
void |
set(long e1,
java.lang.String e2)
|
void |
setE1(long e1)
|
void |
setE2(java.lang.String e2)
|
void |
toBytes(java.nio.ByteBuffer buffer)
Serializes all elements into a ByteBuffer . |
void |
wrap(java.nio.ByteBuffer buffer)
Deserializes the value from a ByteBuffer . |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LongString()
public LongString(long e1, java.lang.String e2) throws Value.InvalidArgumentException
e1
- e2
-
InvalidArgumentException
- if e2 is empty or contains
any whitespace character.
Value.InvalidArgumentException
public LongString(LongString pair)
Method Detail |
---|
public long getE1()
public java.lang.String getE2()
public TokenStream parseFrom(TokenStream in) throws java.io.IOException
Value
TokenStream
.
parseFrom
in interface Value
in
- the token stream to read the value from.
java.io.IOException
public java.io.PrintWriter printTo(java.io.PrintWriter out)
Value
#toString()
, but for serialization purposes this method is
much faster since no temporal variables are needed.
printTo
in interface Value
out
- the print writer to write the value to.
public java.io.PrintStream printTo(java.io.PrintStream out)
Value
#toString()
, but for serialization purposes this method is
much faster since no temporal variables are needed.
printTo
in interface Value
out
- the print stream to write the value to.
public void setE1(long e1)
public void setE2(java.lang.String e2) throws Value.InvalidArgumentException
e2
-
InvalidArgumentException
- if e2 is empty or contains
any whitespace character.
Value.InvalidArgumentException
public void set(long e1, java.lang.String e2) throws Value.InvalidArgumentException
e1
- e2
-
InvalidArgumentException
- if e2 is empty or contains
any whitespace character.
Value.InvalidArgumentException
public int byteSize()
Value
ByteBuffer
when calling Value.toBytes(ByteBuffer)
.
byteSize
in interface Value
Value.wrap(ByteBuffer)
,
Value.toBytes(ByteBuffer)
public void toBytes(java.nio.ByteBuffer buffer)
Value
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()
toBytes
in interface Value
buffer
- a byte buffer to serialize the value to.Value.wrap(ByteBuffer)
public void wrap(java.nio.ByteBuffer buffer)
Value
ByteBuffer
.
All elements of this value are read from the current get position.
wrap
in interface Value
buffer
- a byte buffer that contains all elements of this value.Value.toBytes(ByteBuffer)
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |