org.jfree.data
Class ComparableObjectItem
- java.lang.Object
-
- org.jfree.data.ComparableObjectItem
-
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable, java.lang.Comparable
- Direct Known Subclasses:
- OHLCItem, VectorDataItem, XIntervalDataItem, XYIntervalDataItem, YIntervalDataItem
public class ComparableObjectItem extends java.lang.Object implements java.lang.Cloneable, java.lang.Comparable, java.io.SerializableRepresents one (Comparable, Object) data item for use in aComparableObjectSeries.- Since:
- 1.0.3
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description ComparableObjectItem(java.lang.Comparable x, java.lang.Object y)Constructs a new data item.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description java.lang.Objectclone()Returns a clone of this object.intcompareTo(java.lang.Object o1)Returns an integer indicating the order of this object relative to another object.booleanequals(java.lang.Object obj)Tests if this object is equal to another.inthashCode()Returns a hash code.
-
-
-
Constructor Detail
-
ComparableObjectItem
public ComparableObjectItem(java.lang.Comparable x, java.lang.Object y)Constructs a new data item.- Parameters:
x- the x-value (nullNOT permitted).y- the y-value (nullpermitted).
-
-
Method Detail
-
compareTo
public int compareTo(java.lang.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".
- Specified by:
compareToin interfacejava.lang.Comparable- Parameters:
o1- the object being compared to.- Returns:
- An integer indicating the order of this data pair object relative to another object.
-
clone
public java.lang.Object clone() throws java.lang.CloneNotSupportedExceptionReturns a clone of this object.- Overrides:
clonein classjava.lang.Object- Returns:
- A clone.
- Throws:
java.lang.CloneNotSupportedException- not thrown by this class, but subclasses may differ.
-
equals
public boolean equals(java.lang.Object obj)
Tests if this object is equal to another.- Overrides:
equalsin classjava.lang.Object- Parameters:
obj- the object to test against for equality (nullpermitted).- Returns:
- A boolean.
-
hashCode
public int hashCode()
Returns a hash code.- Overrides:
hashCodein classjava.lang.Object- Returns:
- A hash code.
-
-
DMelt 3.0 © DataMelt by jWork.ORG