net.moioli.drawables
Class ParsedSuccession

java.lang.Object
  extended by net.moioli.drawables.AbstractDrawableSuccession
      extended by net.moioli.drawables.ParsedSuccession
All Implemented Interfaces:
DrawableI, SuccessionI
Direct Known Subclasses:
ParsedSeries

public class ParsedSuccession
extends AbstractDrawableSuccession

A convenient way to implement successions, that is, defining them with a string that will be parsed.

Version:
2005/10/5
Author:
Silvio Moioli
See Also:
ParsedFunction

Constructor Summary
ParsedSuccession()
          Default constructor ({an=n})
ParsedSuccession(java.lang.String s)
          Standard constructor, takes a string and makes up a Succession.
 
Method Summary
 double f(int n)
          Returns the y value corresponding to the specified index n.
 
Methods inherited from class net.moioli.drawables.AbstractDrawableSuccession
drawMe, maxY, minY, safeF
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ParsedSuccession

public ParsedSuccession()
Default constructor ({an=n})


ParsedSuccession

public ParsedSuccession(java.lang.String s)
                 throws org.nfunk.jep.ParseException
Standard constructor, takes a string and makes up a Succession.

Parameters:
s - the string to be parsed
Throws:
org.nfunk.jep.ParseException - if the string isn't parsed correctly
See Also:
ParsedFunction, JEP
Method Detail

f

public double f(int n)
Returns the y value corresponding to the specified index n.

Specified by:
f in interface SuccessionI
Specified by:
f in class AbstractDrawableSuccession
Parameters:
n - the non-negative integer index
Returns:
the value of the succession