jas.hist
Class FunctionRegistry

java.lang.Object
  extended by jas.hist.FunctionRegistry

public class FunctionRegistry
extends Object

A class which maintains a list of functions which can be overlayed on a plot.


Method Summary
 FunctionFactory createFunctionFactory(Class c, String name)
          Create a default function factory from a class and a name
 Enumeration elements()
          Get an enumeration of all the FunctionFactories in the registry
 FunctionFactory find(String name)
           
static FunctionRegistry instance()
          Get the (unique) instance of FunctionRegistry
 void registerFunction(Class c, String name)
          Register a function given its class and name
 void registerFunction(FunctionFactory f)
          Add a function by specifing a FunctionFactory
 void removeAllFunctions()
          Clear the list
 void removeFunctionFactory(FunctionFactory f)
          Remove a function factory from the list
 void setContents(Vector v)
          Replace the contents of the list
 int size()
          Get the size of the registry
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

instance

public static FunctionRegistry instance()
Get the (unique) instance of FunctionRegistry


registerFunction

public void registerFunction(Class c,
                             String name)
Register a function given its class and name

Parameters:
c - The class of the function
name - The name of the function

createFunctionFactory

public FunctionFactory createFunctionFactory(Class c,
                                             String name)
Create a default function factory from a class and a name

Parameters:
c - The class of the function
name - The name of the function
Returns:
The function factory

registerFunction

public void registerFunction(FunctionFactory f)
Add a function by specifing a FunctionFactory


removeFunctionFactory

public void removeFunctionFactory(FunctionFactory f)
Remove a function factory from the list


removeAllFunctions

public void removeAllFunctions()
Clear the list


elements

public Enumeration elements()
Get an enumeration of all the FunctionFactories in the registry


size

public int size()
Get the size of the registry


find

public FunctionFactory find(String name)

setContents

public void setContents(Vector v)
Replace the contents of the list

Parameters:
e - An enumeration of function factories


Copyright © 2000-2009 FreeHEP. All Rights Reserved.