2.17.2: 2011-06-17

net.sf.basedb.util.plot
Class PlotAnnotation

java.lang.Object
  extended by 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 which getValues() 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 (Fri, 13 Aug 2010) $

Field Summary
private  String name
           
private  Collection<Integer> values
           
 
Constructor Summary
PlotAnnotation(String name, Collection<Integer> values)
          Create a new PlotAnnotation.
PlotAnnotation(String name, int value)
          Create a new PlotAnnotation.
 
Method Summary
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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 image
value - 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 image
values - 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 another PlotAnnotation.


compareTo

public int compareTo(PlotAnnotation o)
Specified by:
compareTo in interface Comparable<PlotAnnotation>

2.17.2: 2011-06-17