it.unimi.di.mg4j.index.payload
Class AbstractPayload

java.lang.Object
  extended by it.unimi.di.mg4j.index.payload.AbstractPayload
All Implemented Interfaces:
Payload, Serializable, Comparable<Payload>
Direct Known Subclasses:
DatePayload, IntegerPayload

public abstract class AbstractPayload
extends Object
implements Payload

An abstract payload.

The main responsibility of this class is that of implementing rangeFilter(Payload, Payload) using the Comparable methods.

See Also:
Serialized Form

Nested Class Summary
protected  class AbstractPayload.ComparatorPayloadPredicate
           
 
Constructor Summary
AbstractPayload()
           
 
Method Summary
 AbstractPayload.ComparatorPayloadPredicate rangeFilter(Payload left, Payload right)
          Returns a payload filter matching the interval defined by the given parameters.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface it.unimi.di.mg4j.index.payload.Payload
compatibleWith, copy, get, read, set, write
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Constructor Detail

AbstractPayload

public AbstractPayload()
Method Detail

rangeFilter

public AbstractPayload.ComparatorPayloadPredicate rangeFilter(Payload left,
                                                              Payload right)
Description copied from interface: Payload
Returns a payload filter matching the interval defined by the given parameters.

Specified by:
rangeFilter in interface Payload
Parameters:
left - the left extreme of the interval (inclusive). It will be cached (but not copied) internally.
right - the right extreme of the interval (exclusive). It will be cached (but not copied) internally.
Returns:
a payload filter for the interval defined above.