|
![]() |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.ascape.util.data.DataPointComparator
public class DataPointComparator
An interface for a class comparing objects using a data point. The datapoint can be set, or this getValue method may be overridden and the class used as the DataPoint itself.
DataPoint
,
Serialized FormConstructor Summary | |
---|---|
DataPointComparator()
Constructs a new data point comparator. |
|
DataPointComparator(DataPoint dataPoint)
Constructs a new data point using the supplied data point as the interpretor of any supplied object's value. |
Method Summary | |
---|---|
int |
compare(java.lang.Object o1,
java.lang.Object o2)
Compares two object using the data point to interpret their values. |
boolean |
equals(java.lang.Object o)
Returns true if the compared comparator uses the same data point. |
java.lang.String |
getName()
Returns the name of this data point comparator. |
double |
getValue(java.lang.Object object)
Returns the value of a given data point from a given object. |
void |
setDataPoint(DataPoint dataPoint)
Sets the data point to be sued by this comparator. |
java.lang.String |
toString()
Returns the name of this data point comparator. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public DataPointComparator()
public DataPointComparator(DataPoint dataPoint)
Method Detail |
---|
public int compare(java.lang.Object o1, java.lang.Object o2)
compare
in interface java.util.Comparator
public boolean equals(java.lang.Object o)
equals
in interface java.util.Comparator
equals
in class java.lang.Object
public double getValue(java.lang.Object object)
getValue
in interface DataPoint
object
- the object to extract the value from.public void setDataPoint(DataPoint dataPoint)
public java.lang.String getName()
getName
in interface DataPoint
getName
in interface HasName
public java.lang.String toString()
toString
in class java.lang.Object
|
![]() |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |