|
Venice 0.7beta | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.mov.chart.Graphable
public class Graphable
Represents a graphable set of X points and their associated Y points.
Example, loading up the class with an exponential graph:
Graphable graphable = new Graphable(); graphable.putY(new Double(1), new Double(1)); graphable.putY(new Double(2), new Double(4)); graphable.putY(new Double(3), new Double(9)); graphable.putY(new Double(4), new Double(16));Find the square of 3:
Double squareOfThree = graphable.getY(new Double(3));
Constructor Summary | |
---|---|
Graphable()
Create an empty graphable. |
Method Summary | |
---|---|
java.lang.Comparable |
getEndX()
Get the last X value where we have an associated Y value. |
double |
getHighestY(java.util.List xRange)
Given an X range, inspect all the associated Y values and return the highest. |
double |
getLowestY(java.util.List xRange)
Given an X range, inspect all the associated Y values and return the lowest. |
java.util.LinkedHashMap |
getMap()
|
java.lang.Comparable |
getStartX()
Get the first X value where we have an associated Y value. |
java.util.Set |
getXRange()
Get all the X values for where we have an associated Y value. |
java.lang.Double |
getY(java.lang.Comparable x)
Get the Y value for the given X value. |
java.util.Iterator |
iterator()
Return an interator which iterates over the X values. |
void |
putY(java.lang.Comparable x,
java.lang.Double y)
Associate the given X value with the given Y value. |
double[] |
toArray()
Return all the Y values as an array. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Graphable()
Method Detail |
---|
public java.lang.Comparable getEndX()
public java.lang.Comparable getStartX()
public java.lang.Double getY(java.lang.Comparable x)
x
- the x value
public void putY(java.lang.Comparable x, java.lang.Double y)
x
- the x valuey
- the associated y valuepublic double getHighestY(java.util.List xRange)
xRange
- a List
of Comparable
objects
public double getLowestY(java.util.List xRange)
xRange
- a List
of Comparable
objects
public java.util.Set getXRange()
public double[] toArray()
public java.util.Iterator iterator()
public java.util.LinkedHashMap getMap()
|
Venice 0.7beta | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |