Package org.jfree.data.xy
Class OHLCDataItem
java.lang.Object
org.jfree.data.xy.OHLCDataItem
- All Implemented Interfaces:
Serializable
,Comparable
Represents a single (open-high-low-close) data item in
an
DefaultOHLCDataset
. This data item is commonly used
to summarise the trading activity of a financial commodity for
a fixed period (most often one day).- See Also:
-
Constructor Summary
ConstructorDescriptionOHLCDataItem
(Date date, double open, double high, double low, double close, double volume) Creates a new item. -
Method Summary
Modifier and TypeMethodDescriptionint
Compares this object with the specified object for order.boolean
Checks this instance for equality with an arbitrary object.getClose()
Returns the close value.getDate()
Returns the date that the data item relates to.getHigh()
Returns the high value.getLow()
Returns the low value.getOpen()
Returns the open value.Returns the volume.
-
Constructor Details
-
OHLCDataItem
Creates a new item.- Parameters:
date
- the date (null
not permitted).open
- the open value.high
- the high value.low
- the low value.close
- the close value.volume
- the volume.
-
-
Method Details
-
getDate
Returns the date that the data item relates to.- Returns:
- The date (never
null
).
-
getOpen
Returns the open value.- Returns:
- The open value (never
null
).
-
getHigh
Returns the high value.- Returns:
- The high value (never
null
).
-
getLow
Returns the low value.- Returns:
- The low value (never
null
).
-
getClose
Returns the close value.- Returns:
- The close value (never
null
).
-
getVolume
Returns the volume.- Returns:
- The volume (never
null
).
-
equals
Checks this instance for equality with an arbitrary object. -
compareTo
Compares this object with the specified object for order. Returns a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.- Specified by:
compareTo
in interfaceComparable
- Parameters:
object
- the object to compare to.- Returns:
- A negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.
-