|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.aitools.aq.invertedindex.value.pair.FloatInt
public class FloatInt
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 | |
---|---|
FloatInt()
|
|
FloatInt(FloatInt pair)
|
|
FloatInt(float e1,
int e2)
|
Method Summary | |
---|---|
int |
byteSize()
Returns the serialized size of this value. |
boolean |
equals(java.lang.Object obj)
|
float |
getE1()
|
int |
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(int e1,
int e2)
|
void |
setE1(float e1)
|
void |
setE2(int 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 FloatInt()
public FloatInt(float e1, int e2)
public FloatInt(FloatInt pair)
Method Detail |
---|
public float getE1()
public int 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(float e1)
public void setE2(int e2)
public void set(int e1, int e2)
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 |