Package net.sf.basedb.util.plot
Class PlotAnnotation
- java.lang.Object
-
- net.sf.basedb.util.plot.PlotAnnotation
-
- All Implemented Interfaces:
Comparable<PlotAnnotation>
public class PlotAnnotation extends Object implements Comparable<PlotAnnotation>
Used to map spot data into different annotations. The mapping is done by checking whichgetValues()
collection a value falls in.- Version:
- 2.0
- Author:
- Nicklas
- See Also:
ScatterPlot.addData(SqlResultIterator, Collection)
- Last modified
- $Date: 2010-08-13 10:50:27 +0200 (fr, 13 aug 2010) $
-
-
Field Summary
Fields Modifier and Type Field Description private String
name
private Collection<Integer>
values
-
Constructor Summary
Constructors Constructor Description PlotAnnotation(String name, int value)
Create a new PlotAnnotation.PlotAnnotation(String name, Collection<Integer> values)
Create a new PlotAnnotation.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareTo(PlotAnnotation o)
String
getName()
The name of the annotation, which will be used as a label in the image.Collection<Integer>
getValues()
The values that falls into this annotation.
-
-
-
Field Detail
-
name
private final String name
-
values
private final Collection<Integer> values
-
-
Constructor Detail
-
PlotAnnotation
public PlotAnnotation(String name, int value)
Create a new PlotAnnotation.- Parameters:
name
- The name of the annotation, which will be used as a label in the imagevalue
- The value that belongs to this annotation- Since:
- 2.2
-
PlotAnnotation
public PlotAnnotation(String name, Collection<Integer> values)
Create a new PlotAnnotation.- Parameters:
name
- The name of the annotation, which will be used as a label in the imagevalues
- The values that belongs to this annotation
-
-
Method Detail
-
getName
public String getName()
The name of the annotation, which will be used as a label in the image.
-
getValues
public Collection<Integer> getValues()
The values that falls into this annotation. This collection shouldn't contain a value that is also found in anotherPlotAnnotation
.
-
compareTo
public int compareTo(PlotAnnotation o)
- Specified by:
compareTo
in interfaceComparable<PlotAnnotation>
-
-