org.gcube.portlets.user.timeseries.charts.support.types
Class Point<S extends Number,T extends Number>
java.lang.Object
org.gcube.portlets.user.timeseries.charts.support.types.Point<S,T>
- All Implemented Interfaces:
- Serializable
public class Point<S extends Number,T extends Number>
- extends Object
- implements 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
Point
public Point(S value)
throws InvalidParameterException
- Throws:
InvalidParameterException
Point
public Point(String label,
S value)
throws InvalidParameterException
- Throws:
InvalidParameterException
Point
public Point(S value,
ValueEntry<T>... entries)
throws InvalidParameterException
- Throws:
InvalidParameterException
Point
public Point(String label,
S value,
ValueEntry<T>... entries)
throws InvalidParameterException
- Throws:
InvalidParameterException
setLabel
public final void setLabel(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 List<ValueEntry<T>> getEntries()
getLabel
public final String getLabel()
toString
public final String toString()
- Overrides:
toString
in class Object
Copyright © 2012. All Rights Reserved.