org.gcube.portlets.user.timeseries.charts.support.types
Class Point<S extends java.lang.Number,T extends java.lang.Number>
java.lang.Object
org.gcube.portlets.user.timeseries.charts.support.types.Point<S,T>
- All Implemented Interfaces:
- java.io.Serializable
public class Point<S extends java.lang.Number,T extends java.lang.Number>
- extends java.lang.Object
- implements java.io.Serializable
The Point consists of a single entry in the graph system.
Since to each point multiple values can be related,
a point essentially consists of a String (its label),
and a list of ValueEntry
couples (String, Value).
The type T declares the number format of entries (e.g. int, double...).
Usage:
// Here a point is represented by integer values on the
// X axis and floats on the relative Y axis values.
new Point<Integer, Float>("Avg 2010",
2010, // The value of column entry
// The rows associated to this column
new ValueEntry<Float>("Entry1", 500.34f),
new ValueEntry<Float>("Entry2", 230.56f));
- Author:
- Daniele Strollo (ISTI-CNR)
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Point
public Point(S value)
throws InvalidParameterException
- Throws:
InvalidParameterException
Point
public Point(java.lang.String label,
S value)
throws InvalidParameterException
- Throws:
InvalidParameterException
Point
public Point(S value,
ValueEntry<T>... entries)
throws InvalidParameterException
- Throws:
InvalidParameterException
Point
public Point(java.lang.String label,
S value,
ValueEntry<T>... entries)
throws InvalidParameterException
- Throws:
InvalidParameterException
setLabel
public final void setLabel(java.lang.String label)
setValue
public final void setValue(S value)
throws InvalidParameterException
- Throws:
InvalidParameterException
getValue
public final S getValue()
addEntry
public final void addEntry(ValueEntry<T> entry)
setEntries
public final void setEntries(ValueEntry<T>... entries)
sortEntries
public final void sortEntries()
getEntries
public final java.util.List<ValueEntry<T>> getEntries()
getLabel
public final java.lang.String getLabel()
toString
public final java.lang.String toString()
- Overrides:
toString
in class java.lang.Object