public class RankedJoinObject extends RankedAbstractObject
comparator
Constructor and Description |
---|
RankedJoinObject(AbstractObject leftObject,
AbstractObject rightObject,
float distance)
Creates a new instance of RankedJoinObject for a pair of objects and their measured distance.
|
RankedJoinObject(LocalAbstractObject leftObject,
LocalAbstractObject rightObject)
Creates a new instance of RankedJoinObject by measuring the objects' distance online.
|
RankedJoinObject(T leftObject,
T rightObject,
DistanceFunction<? super T> distanceFunction)
Creates a new instance of RankedJoinObject by measuring the objects' distance online
using a given distance function.
|
Modifier and Type | Method and Description |
---|---|
void |
clearSurplusData()
Clears the data stored in this object.
|
boolean |
equals(java.lang.Object obj)
Returns true if this encapsulated object is equal to the specified
DistanceRankedObject encapsulated object. |
AbstractObject |
getLeftObject()
Returns the left object of the pair.
|
AbstractObject |
getRightObject()
Returns the right object of the pair.
|
int |
hashCode()
Returns a hash code value for the pair of object.
|
java.lang.String |
toString() |
clone
compareTo, getDistance, getObject, getObjectsIterator
public RankedJoinObject(AbstractObject leftObject, AbstractObject rightObject, float distance)
leftObject
- the left object of the pairrightObject
- the right object of the pairdistance
- the measured distance for the pairpublic RankedJoinObject(LocalAbstractObject leftObject, LocalAbstractObject rightObject)
leftObject
- the left object of the pairrightObject
- the right object of the pairpublic RankedJoinObject(T leftObject, T rightObject, DistanceFunction<? super T> distanceFunction) throws java.lang.NullPointerException
T
- the type of object used to measure the distanceleftObject
- the left object of the pairrightObject
- the right object of the pairdistanceFunction
- the distance function used for the measuringjava.lang.NullPointerException
- if the distance function is nullpublic AbstractObject getLeftObject()
public AbstractObject getRightObject()
public void clearSurplusData()
Clearable
clearSurplusData
in interface Clearable
clearSurplusData
in class RankedAbstractObject
public boolean equals(java.lang.Object obj)
DistanceRankedObject
encapsulated object. Null values
are handled correctly.
Note that the equality defined by this method is inconsistent with DistanceRankedObject.compareTo(messif.objects.util.DistanceRankedObject<?>)
.
equals
in class DistanceRankedObject<AbstractObject>
obj
- the reference object with which to comparetrue
if this object is the same as the obj argument; false
otherwisepublic int hashCode()
hashCode
in class DistanceRankedObject<AbstractObject>
public java.lang.String toString()
toString
in class DistanceRankedObject<AbstractObject>