org.cytoscape.equations.builtins
Class Var
java.lang.Object
org.cytoscape.equations.AbstractFunction
org.cytoscape.equations.builtins.Var
- All Implemented Interfaces:
- Function
public class Var
- extends AbstractFunction
Constructor Summary |
Var()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Var
public Var()
getName
public String getName()
- Used to parse the function string. This name is treated in a case-insensitive manner!
- Specified by:
getName
in interface Function
- Specified by:
getName
in class AbstractFunction
- Returns:
- the name by which you must call the function when used in an attribute equation.
getFunctionSummary
public String getFunctionSummary()
- Used to provide help for users.
- Specified by:
getFunctionSummary
in interface Function
- Specified by:
getFunctionSummary
in class AbstractFunction
- Returns:
- a description of what this function does
getReturnType
public Class getReturnType()
- Specified by:
getReturnType
in interface Function
- Specified by:
getReturnType
in class AbstractFunction
- Returns:
- the static return type of this function, Object.class, Double.cLass, String.class, or Boolean.class.
If the static return type is Object.class, the dynamic return type will be one of Double.cLass, String.class, or Boolean.class
and will depend on the arguments passed to the function!
Note, this is used by external tools used to filter a list of functions based on what a valid return type might be.
In Cytoscape it is used in the attribute browser's formula builder.
evaluateFunction
public Object evaluateFunction(Object[] args)
throws FunctionError
- Description copied from class:
AbstractFunction
- Used to invoke this function.
- Specified by:
evaluateFunction
in interface Function
- Specified by:
evaluateFunction
in class AbstractFunction
- Parameters:
args
- the function arguments which must be a list followed by a numeric argument
- Returns:
- the result of the function evaluation which is the maximum of the elements in the single list argument or the maximum of the one or more double arguments
- Throws:
ArithmeticException
IllegalArgumentException
- thrown if any of the members of the single List argument cannot be converted to a number
FunctionError
Copyright 2010 Cytoscape Consortium. All rights reserved.