org.jfree.data
public class ComparableObjectItem extends Object implements Cloneable, Comparable, Serializable
Since: 1.0.3
| Constructor Summary | |
|---|---|
| ComparableObjectItem(Comparable x, Object y)
Constructs a new data item.
| |
| Method Summary | |
|---|---|
| Object | clone()
Returns a clone of this object.
|
| int | compareTo(Object o1)
Returns an integer indicating the order of this object relative to
another object.
|
| boolean | equals(Object obj)
Tests if this object is equal to another.
|
| protected Comparable | getComparable()
Returns the x-value.
|
| protected Object | getObject()
Returns the y-value.
|
| int | hashCode()
Returns a hash code.
|
| protected void | setObject(Object y)
Sets the y-value for this data item. |
Parameters: x the x-value (null NOT permitted). y the y-value (null permitted).
Returns: A clone.
Throws: CloneNotSupportedException not thrown by this class, but subclasses may differ.
For the order we consider only the x-value: negative == "less-than", zero == "equal", positive == "greater-than".
Parameters: o1 the object being compared to.
Returns: An integer indicating the order of this data pair object relative to another object.
Parameters: obj the object to test against for equality (null
permitted).
Returns: A boolean.
Returns: The x-value (never null).
Returns: The y-value (possibly null).
Returns: A hash code.
Parameters: y the new y-value (null permitted).