jcckit.data
Class DataCurve
java.lang.Object
|
+--jcckit.data.DataContainer
|
+--jcckit.data.DataCurve
- All Implemented Interfaces:
- DataElement
- public class DataCurve
- extends DataContainer
- implements DataElement
A curve is a DataContainer
of DataPoints
.
- Author:
- Franz-Josef Elmer
Field Summary |
static java.lang.String |
TITLE_KEY
Config parameter key. |
static java.lang.String |
X_KEY
Config parameter key. |
static java.lang.String |
Y_KEY
Config parameter key. |
Constructor Summary |
DataCurve(ConfigParameters config)
Creates an instance from the specfied config parameters.
|
DataCurve(java.lang.String title)
Creates an empty instance with the specified title. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
X_KEY
public static final java.lang.String X_KEY
- Config parameter key.
Y_KEY
public static final java.lang.String Y_KEY
- Config parameter key.
TITLE_KEY
public static final java.lang.String TITLE_KEY
- Config parameter key.
DataCurve
public DataCurve(java.lang.String title)
- Creates an empty instance with the specified title.
DataCurve
public DataCurve(ConfigParameters config)
- Creates an instance from the specfied config parameters.
Key & Default Value | Type | Mandatory |
Description |
title = empty string |
String | no |
Curve title. |
x | double[] | yes |
x-coordinates of the curve points. |
y | double[] | yes |
y-coordinates of the curve points. |
getContainer
public DataContainer getContainer()
- Returns the
DataPlot
containing this curve.
- Specified by:
getContainer
in interface DataElement
- Following copied from interface:
jcckit.data.DataElement
- Returns:
- null if this element is not an element of a container.
setContainer
public void setContainer(DataContainer container)
- Sets the
DataPlot
where this is a curve of.
- Specified by:
setContainer
in interface DataElement
- Following copied from interface:
jcckit.data.DataElement
- Parameters:
container
- Container which should contains this element. Cann be
null if this element does not belong to a container.
getTitle
public java.lang.String getTitle()
- Returns the title of this curve.
isValid
protected boolean isValid(DataElement element)
- Returns true if element is an instance of
DataPoint
.
- Overrides:
isValid
in class DataContainer
- Following copied from class:
jcckit.data.DataContainer
- Parameters:
element
- DataElement to be checked.