org.omegahat.Environment.Databases
Class LazyFunctionDatabase
java.lang.Object
|
+--org.omegahat.Environment.Databases.ObjectDatabase
|
+--org.omegahat.Environment.Databases.ReadWriteDatabase
|
+--org.omegahat.Environment.Databases.TypedDatabase
|
+--org.omegahat.Environment.Databases.LazyFunctionDatabase
- All Implemented Interfaces:
- Activable, Database, DatabaseNotifier, DynamicFieldAccessInt, MergableInt, Named, ReadWriteDatabaseInt, java.io.Serializable, Subsettable, TypedDatabaseInt
- public class LazyFunctionDatabase
- extends TypedDatabase
Database
used to implement lazy arguments
keeping the appropriate entires as unevaluated
expressions and evaluating them when they are
first accessed, caching the resulting values
for future access.
- See Also:
- Serialized Form
| Methods inherited from class org.omegahat.Environment.Databases.ObjectDatabase |
addAssignListener, addAttachListener, addDetachListener, addListener, addRemoveListener, assign, attach, clear, detach, exists, getDynamicField, getName, getState, getTable, merge, merge, notify, objects, put, readOnly, readOnly, readSerialized, readSerialized, readSerialized, remove, setDynamicField, setName, setState, setTable, size, subset, table, table |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultStripFlag
public static boolean DefaultStripFlag
LazyArgument
public static java.lang.String LazyArgument
evaluator
protected Evaluator evaluator
function
protected LazyFunction function
LazyFunctionDatabase
public LazyFunctionDatabase()
LazyFunctionDatabase
public LazyFunctionDatabase(java.lang.String name)
LazyFunctionDatabase
public LazyFunctionDatabase(LazyFunction function)
LazyFunctionDatabase
public LazyFunctionDatabase(LazyFunction function,
Evaluator evaluator)
get
public java.lang.Object get(java.lang.String name,
Evaluator evaluator)
get
public java.lang.Object get(java.lang.String name)
- Description copied from interface:
Database
- returns the object in the database assigned under the name.
or
null if none.
- Overrides:
get in class ObjectDatabase
get
public java.lang.Object get(java.lang.String name,
boolean evaluate)
throws java.lang.Throwable
get
public java.lang.Object get(java.lang.String name,
boolean evaluate,
boolean strip)
throws java.lang.Throwable
assign
public boolean assign(java.lang.String name,
java.lang.Object obj)
throws java.lang.Exception
- Description copied from interface:
Database
- assigns
obj to the database under name.
- Overrides:
assign in class TypedDatabase
- Following copied from interface:
org.omegahat.Environment.Databases.Database
- Parameters:
obj - any object, including nullname - a string (preferably non-empty) to locate the object in
the database.
evaluator
public Evaluator evaluator()
evaluator
public Evaluator evaluator(Evaluator eval)
templateDB
public Database templateDB()
Function
public LazyFunction Function()
Function
public LazyFunction Function(LazyFunction f)
isLazy
public boolean isLazy(java.lang.String name)