|
Cytoscape 3.0.0-beta1 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.cytoscape.equations.AbstractFunction
public abstract class AbstractFunction
Base class for all Function
implementations.
Constructor Summary | |
---|---|
protected |
AbstractFunction(ArgDescriptor[] argDescriptors)
Base class constructor for easy creation of Function s from function argument descriptors. |
Method Summary | |
---|---|
protected boolean |
argTypesAreValid(Class[] argTypes)
Returns true of false if the args passed in had arity of a type mismatch. |
abstract Object |
evaluateFunction(Object[] args)
Used to invoke this function. |
abstract String |
getFunctionSummary()
Used to provide help for users. |
abstract String |
getName()
Used to parse the function string. |
List<Class<?>> |
getPossibleArgTypes(Class[] leadingArgs)
Used with the equation builder. |
abstract Class |
getReturnType()
Returns the static return type of this function. |
String |
getUsageDescription()
Used to provide help for users. |
Class |
validateArgTypes(Class[] argTypes)
Returns the return type of this function. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected AbstractFunction(ArgDescriptor[] argDescriptors)
Function
s from function argument descriptors.
argDescriptors
- an array describing the Function
argument listMethod Detail |
---|
public abstract String getName()
getName
in interface Function
public abstract String getFunctionSummary()
getFunctionSummary
in interface Function
public final String getUsageDescription()
getUsageDescription
in interface Function
public abstract Class getReturnType()
getReturnType
in interface Function
protected final boolean argTypesAreValid(Class[] argTypes)
argTypes
- the args to check for wrong arity or a type mismatch.
public final Class validateArgTypes(Class[] argTypes)
validateArgTypes
in interface Function
argTypes
- the args to check for wrong arity or a type mismatch.
public abstract Object evaluateFunction(Object[] args) throws FunctionError
evaluateFunction
in interface Function
args
- the function arguments which must correspond in type and number to what getParameterTypes() returns.
ArithmeticException
- thrown if a numeric error, e.g. a division by zero occurred.
IllegalArgumentException
- thrown for any error that is not a numeric error,
for example if a function only accepts positive numbers and a negative number was passed in.
FunctionError
public final List<Class<?>> getPossibleArgTypes(Class[] leadingArgs)
getPossibleArgTypes
in interface Function
leadingArgs
- the types of the arguments that have already been selected by the user.
|
Cytoscape 3.0.0-beta1 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |