|
|||||||||
| 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.DatePayload
public class DatePayload
A payload containing a date expressed as seconds from the Epoch and stored using δ coding.
Note that since the date is stored in seconds, it is possible that
setting a current value and getting it back does not given an equal Date object.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class it.unimi.di.mg4j.index.payload.AbstractPayload |
|---|
AbstractPayload.ComparatorPayloadPredicate |
| Field Summary | |
|---|---|
protected long |
secondsFromEpoch
|
| Constructor Summary | |
|---|---|
DatePayload()
|
|
| Method Summary | |
|---|---|
int |
compareTo(Payload o)
|
boolean |
compatibleWith(Payload payload)
Returns true if this payload instance is compatible with another instance. |
DatePayload |
copy()
Returns a copy of this payload. |
boolean |
equals(Payload o)
|
Date |
get()
Returns the value of this payload. |
int |
hashCode()
|
Date |
parse(String spec)
|
int |
read(InputBitStream ibs)
Sets the current value of this payload by reading from an input bit stream. |
void |
set(Object date)
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 long secondsFromEpoch
| Constructor Detail |
|---|
public DatePayload()
| Method Detail |
|---|
public Date get()
PayloadImplementing classes are expected to override covariantly the return value to the actual class stored by the payload.
public void set(Object date)
Payload
date - 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.
IOExceptionpublic DatePayload copy()
PayloadImplementing classes are expected to override covariantly the return value to the actual payload type.
public String toString()
toString in class Objectpublic boolean compatibleWith(Payload payload)
Payload
public int compareTo(Payload o)
public boolean equals(Payload o)
public int hashCode()
hashCode in class Object
public Date parse(String spec)
throws ParseException
ParseException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||