jabble
Class MethodFunctionField

java.lang.Object
  extended by jabble.MethodFunctionField
All Implemented Interfaces:
FunctionField

public class MethodFunctionField
extends java.lang.Object
implements FunctionField


Constructor Summary
MethodFunctionField(java.lang.reflect.Method method, java.lang.Object obj, int nCoords)
          Creates a new instance of MethodFunctionField
 
Method Summary
 double calculateAt(Point point)
          Calculates the expression at a given point.
 void setupFields(java.util.List<Slice> slices)
          Sets the set of slices on which the expression will be calculated.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MethodFunctionField

public MethodFunctionField(java.lang.reflect.Method method,
                           java.lang.Object obj,
                           int nCoords)
Creates a new instance of MethodFunctionField

Method Detail

setupFields

public void setupFields(java.util.List<Slice> slices)
Description copied from interface: FunctionField
Sets the set of slices on which the expression will be calculated. The implementation of this method should extract all the fields and constants that are going to be needed for calculateAt().

Specified by:
setupFields in interface FunctionField
Parameters:
slices - a list of slices in reverse evolution order (newest first)

calculateAt

public double calculateAt(Point point)
Description copied from interface: FunctionField
Calculates the expression at a given point.

Specified by:
calculateAt in interface FunctionField
Parameters:
point - the Point at which the expression is calculated.
Returns:
the value of the expression.