com.japisoft.formula.lib
Class AbstractLib

java.lang.Object
  extended bycom.japisoft.formula.lib.AbstractLib
All Implemented Interfaces:
Lib
Direct Known Subclasses:
Standard

public abstract class AbstractLib
extends java.lang.Object
implements Lib

Abstraction for any libraries

More information at : http://www.japisoft.com

Version:
1.0
Author:
(c) 2002 JAPISoft
See Also:
Lib

Constructor Summary
AbstractLib()
           
AbstractLib(java.lang.String name)
           
 
Method Summary
 Variant evaluate(java.lang.String functionName, ListOfArgument args)
           
 Function[] getFunctions()
           
 java.lang.String getName()
           
 void install(Function function)
          Install a new function evaluation
 void install(Lib lib)
          Install a secondary library
 void install(java.lang.String function)
          Install a new function by its class name
 void setName(java.lang.String name)
           
 java.lang.String toString()
           
 void uninstall(Function function)
           
 void uninstall(Lib lib)
          Uninstall a secondary lib
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AbstractLib

public AbstractLib()

AbstractLib

public AbstractLib(java.lang.String name)
Parameters:
name - a library name
Method Detail

setName

public void setName(java.lang.String name)
Parameters:
name - the current library name

getName

public java.lang.String getName()
Specified by:
getName in interface Lib
Returns:
the library name

toString

public java.lang.String toString()

getFunctions

public Function[] getFunctions()
Specified by:
getFunctions in interface Lib
Returns:
a list of function. This function never returns null

evaluate

public Variant evaluate(java.lang.String functionName,
                        ListOfArgument args)
                 throws LibException
Specified by:
evaluate in interface Lib
Returns:
an evaluation for a functionName and the following args. This function will use the following order : every installed functions will be evaluated for matching arguments and name, then the installed libraries will be evaluated
Throws:
LibException

install

public void install(Function function)
Install a new function evaluation


install

public void install(java.lang.String function)
Install a new function by its class name


uninstall

public void uninstall(Function function)
Parameters:
function - a function to remove from evaluation

install

public void install(Lib lib)
Install a secondary library


uninstall

public void uninstall(Lib lib)
Uninstall a secondary lib