org.jfree.data.xy
Class XYDataItem
java.lang.Object
org.jfree.data.xy.XYDataItem
- Cloneable, Comparable, Serializable
extends java.lang.Object
implements Cloneable, Comparable, Serializable
Represents one (x, y) data item for an
XYSeries
.
XYDataItem(Number x, Number y) - Constructs a new data item.
|
XYDataItem(double x, double y) - Constructs a new data item.
|
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.
|
Number | getX() - Returns the x-value.
|
Number | getY() - Returns the y-value.
|
int | hashCode() - Returns a hash code.
|
void | setY(Number y) - Sets the y-value for this data item.
|
void | setY(double y) - Sets the y-value for this data item.
|
XYDataItem
public XYDataItem(Number x,
Number y)
Constructs a new data item.
x
- the x-value (null
NOT permitted).y
- the y-value (null
permitted).
XYDataItem
public XYDataItem(double x,
double y)
Constructs a new data item.
x
- the x-value.y
- the y-value.
clone
public Object clone()
throws CloneNotSupportedException
Returns a clone of this object.
compareTo
public int compareTo(Object o1)
Returns an integer indicating the order of this object relative to
another object.
For the order we consider only the x-value:
negative == "less-than", zero == "equal", positive == "greater-than".
o1
- the object being compared to.
- An integer indicating the order of this data pair object
relative to another object.
equals
public boolean equals(Object obj)
Tests if this object is equal to another.
obj
- the object to test against for equality (null
permitted).
getX
public Number getX()
Returns the x-value.
- The x-value (never
null
).
getY
public Number getY()
Returns the y-value.
- The y-value (possibly
null
).
hashCode
public int hashCode()
Returns a hash code.
setY
public void setY(Number y)
Sets the y-value for this data item. Note that there is no
corresponding method to change the x-value.
y
- the new y-value (null
permitted).
setY
public void setY(double y)
Sets the y-value for this data item. Note that there is no
corresponding method to change the x-value.