public class ComparableObjectItem extends Object implements Cloneable, Comparable, Serializable
ComparableObjectSeries
.Constructor and Description |
---|
ComparableObjectItem(Comparable x,
Object y)
Constructs a new data item.
|
Modifier and Type | Method and Description |
---|---|
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.
|
public ComparableObjectItem(Comparable x, Object y)
x
- the x-value (null
NOT permitted).y
- the y-value (null
permitted).protected Comparable getComparable()
null
).protected Object getObject()
null
).protected void setObject(Object y)
y
- the new y-value (null
permitted).public int compareTo(Object o1)
For the order we consider only the x-value: negative == "less-than", zero == "equal", positive == "greater-than".
compareTo
in interface Comparable
o1
- the object being compared to.public Object clone() throws CloneNotSupportedException
clone
in class Object
CloneNotSupportedException
- not thrown by this class, but
subclasses may differ.public boolean equals(Object obj)
Copyright © 2001–2017 JFree.org. All rights reserved.