public class XYDataItem extends Object implements Cloneable, Comparable, Serializable
XYSeries
. Note that
subclasses are REQUIRED to support cloning.Constructor and Description |
---|
XYDataItem(double x,
double y)
Constructs a new data item.
|
XYDataItem(Number x,
Number 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.
|
Number |
getX()
Returns the x-value.
|
double |
getXValue()
Returns the x-value as a double primitive.
|
Number |
getY()
Returns the y-value.
|
double |
getYValue()
Returns the y-value as a double primitive.
|
int |
hashCode()
Returns a hash code.
|
void |
setY(double y)
Sets the y-value for this data item.
|
void |
setY(Number y)
Sets the y-value for this data item.
|
String |
toString()
Returns a string representing this instance, primarily for debugging
use.
|
public XYDataItem(Number x, Number y)
x
- the x-value (null
NOT permitted).y
- the y-value (null
permitted).public XYDataItem(double x, double y)
x
- the x-value.y
- the y-value.public Number getX()
null
).public double getXValue()
getX()
,
getYValue()
public Number getY()
null
).public double getYValue()
getY()
,
getXValue()
public void setY(double y)
y
- the new y-value.public void setY(Number 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()
public boolean equals(Object obj)
public int hashCode()
Jas4pp 1.5 © Java Analysis Studio for Particle Physics