Cytoscape 2.8.0 API

Class Count

  extended by org.cytoscape.equations.AbstractFunction
      extended by org.cytoscape.equations.builtins.Count
All Implemented Interfaces:

public class Count
extends AbstractFunction

Constructor Summary
Method Summary
 Object evaluateFunction(Object[] args)
          Used to invoke this function.
 String getFunctionSummary()
          Used to provide help for users.
 String getName()
          Used to parse the function string.
 Class getReturnType()
Methods inherited from class org.cytoscape.equations.AbstractFunction
argTypesAreValid, getPossibleArgTypes, getUsageDescription, validateArgTypes
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


public Count()
Method Detail


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
the name by which you must call the function when used in an attribute equation.


public String getFunctionSummary()
Used to provide help for users.

Specified by:
getFunctionSummary in interface Function
Specified by:
getFunctionSummary in class AbstractFunction
a description of what this function does


public Class getReturnType()
Specified by:
getReturnType in interface Function
Specified by:
getReturnType in class AbstractFunction
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.


public Object evaluateFunction(Object[] args)
                        throws IllegalArgumentException,
Description copied from class: AbstractFunction
Used to invoke this function.

Specified by:
evaluateFunction in interface Function
Specified by:
evaluateFunction in class AbstractFunction
args - the function arguments which can be anything
the result of the function evaluation which is the count of the arguments that are numbers for scalar arguments plus the count of list entries that are numbers for List arguments
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.
ArithmeticException - thrown if a numeric error, e.g. a division by zero occurred.

Cytoscape 2.8.0 API

Copyright 2010 Cytoscape Consortium. All rights reserved.