jas2.hist
Class FunctionRegistry
- java.lang.Object
-
- jas2.hist.FunctionRegistry
-
public class FunctionRegistry extends java.lang.ObjectA class which maintains a list of functions which can be overlayed on a plot.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description FunctionFactorycreateFunctionFactory(java.lang.Class c, java.lang.String name)Create a default function factory from a class and a namejava.util.Enumerationelements()Get an enumeration of all the FunctionFactories in the registryFunctionFactoryfind(java.lang.String name)static FunctionRegistryinstance()Get the (unique) instance of FunctionRegistryvoidregisterFunction(java.lang.Class c, java.lang.String name)Register a function given its class and namevoidregisterFunction(FunctionFactory f)Add a function by specifing a FunctionFactoryvoidremoveAllFunctions()Clear the listvoidremoveFunctionFactory(FunctionFactory f)Remove a function factory from the listvoidsetContents(java.util.Vector v)Replace the contents of the listintsize()Get the size of the registry
-
-
-
Method Detail
-
instance
public static FunctionRegistry instance()
Get the (unique) instance of FunctionRegistry
-
registerFunction
public void registerFunction(java.lang.Class c, java.lang.String name)Register a function given its class and name- Parameters:
c- The class of the functionname- The name of the function
-
createFunctionFactory
public FunctionFactory createFunctionFactory(java.lang.Class c, java.lang.String name)
Create a default function factory from a class and a name- Parameters:
c- The class of the functionname- 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 java.util.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(java.lang.String name)
-
setContents
public void setContents(java.util.Vector v)
Replace the contents of the list- Parameters:
e- An enumeration of function factories
-
-
DataMelt 3.0 © DataMelt by jWork.ORG