org.escot
Class FunctionAdapter
java.lang.Object
|
+--org.escot.BasicFeature
|
+--org.escot.FunctionAdapter
- All Implemented Interfaces:
- EscotFeature, FunctionEvaluator
- public class FunctionAdapter
- extends BasicFeature
- implements FunctionEvaluator
Adapts a method which returns a number and takes a single number
parameter as a FunctionEvaluator.
mTarget
protected Object mTarget
mMethod
protected Method mMethod
FunctionAdapter
public FunctionAdapter(Object target,
Method m)
evaluateAt
public Number evaluateAt(Number number)
- Description copied from interface:
FunctionEvaluator
- Evaluates the function at the given input.
- Specified by:
evaluateAt in interface FunctionEvaluator
- Following copied from interface:
org.escot.FunctionEvaluator
- Parameters:
input - the number to evaluate the function at.- Returns:
- the value of the function at the given input.
addChangeListener
public void addChangeListener(ChangeListener l)
- Description copied from interface:
FunctionEvaluator
- adds a change listener to this function, to be notified when the
function definition changes
- Specified by:
addChangeListener in interface FunctionEvaluator
- Following copied from interface:
org.escot.FunctionEvaluator
- Parameters:
l - a ChangeListener that wants to be notified of changes to this
function
removeChangeListener
public void removeChangeListener(ChangeListener l)
- Description copied from interface:
FunctionEvaluator
- removes a change listener from this function
- Specified by:
removeChangeListener in interface FunctionEvaluator
- Following copied from interface:
org.escot.FunctionEvaluator
- Parameters:
l - a ChangeListener that no longer wants to listen to change events
from this function
toString
public String toString()
- Description copied from interface:
FunctionEvaluator
- converts the function to a string representation
- Specified by:
toString in interface FunctionEvaluator- Overrides:
toString in class Object
- Following copied from interface:
org.escot.FunctionEvaluator
- Returns:
- either a MathML string or a raw character string representation
of the function