prefuse.data.expression
Class FunctionTable

java.lang.Object
  extended by prefuse.data.expression.FunctionTable

public class FunctionTable
extends java.lang.Object

Function table that allows lookup of registered FunctionExpressions by their function name.

Author:
jeffrey heer

Method Summary
static void addFunction(java.lang.String name, java.lang.Class type)
          Add a function to the function table.
static Function createFunction(java.lang.String name)
          Get a new Function instance for the function with the given name.
static boolean hasFunction(java.lang.String name)
          Indicates if a function of the given name is included in the function table.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

hasFunction

public static boolean hasFunction(java.lang.String name)
Indicates if a function of the given name is included in the function table.

Parameters:
name - the function name
Returns:
true if the function is in the table, false otherwise

addFunction

public static void addFunction(java.lang.String name,
                               java.lang.Class type)
Add a function to the function table. It will then become available for use with compiled statements of the prefuse expression language.

Parameters:
name - the name of the function. This name must not already be registered in the table, i.e. there is no function overloading.
type - the Class instance of the function itself

createFunction

public static Function createFunction(java.lang.String name)
Get a new Function instance for the function with the given name.

Parameters:
name - the name of the function to create
Returns:
the instantiated Function


Copyright © 2007 Regents of the University of California