|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectit.unimi.di.mg4j.index.payload.AbstractPayload
it.unimi.di.mg4j.index.payload.IntegerPayload
public class IntegerPayload
A payload containing a long stored using δ coding.
The method set(Object)
will accept any Number
that is in the range allowed by Fast.int2nat(long)
.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class it.unimi.di.mg4j.index.payload.AbstractPayload |
---|
AbstractPayload.ComparatorPayloadPredicate |
Field Summary | |
---|---|
protected boolean |
unset
Whether this payload has been ever set. |
protected long |
value
The current value of this payload, if unset is false. |
Constructor Summary | |
---|---|
IntegerPayload()
|
Method Summary | |
---|---|
int |
compareTo(Payload o)
|
boolean |
compatibleWith(Payload payload)
Returns true if this payload instance is compatible with another instance. |
IntegerPayload |
copy()
Returns a copy of this payload. |
boolean |
equals(Payload o)
|
Long |
get()
Returns the value of this payload. |
long |
getLong()
|
int |
hashCode()
|
Long |
parse(String spec)
|
int |
read(InputBitStream ibs)
Sets the current value of this payload by reading from an input bit stream. |
void |
set(long value)
Sets the current value of this payload. |
void |
set(Object value)
Sets the current value of this payload. |
String |
toString()
|
int |
write(OutputBitStream obs)
Serialises the current value of this payload to the given output bit stream. |
Methods inherited from class it.unimi.di.mg4j.index.payload.AbstractPayload |
---|
rangeFilter |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected boolean unset
protected long value
unset
is false.
Constructor Detail |
---|
public IntegerPayload()
Method Detail |
---|
public Long get()
Payload
Implementing classes are expected to override covariantly the return value to the actual class stored by the payload.
public long getLong()
public void set(long value)
value
- the new value of this payload (must be
in the range allowed by Fast.int2nat(long)
).public void set(Object value)
Payload
value
- the new value of this payload.public int read(InputBitStream ibs) throws IOException
Payload
ibs
- a bit stream.
IOException
public int write(OutputBitStream obs) throws IOException
Payload
obs
- the bit stream receiving the bits.
IOException
public IntegerPayload copy()
Payload
Implementing classes are expected to override covariantly the return value to the actual payload type.
public String toString()
toString
in class Object
public boolean compatibleWith(Payload payload)
Payload
public int compareTo(Payload o)
public boolean equals(Payload o)
public int hashCode()
hashCode
in class Object
public Long parse(String spec)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |