|
|||||||||
| Home >> All >> org >> scoja >> server >> [ core overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.scoja.server.core
Class LazyStackedEnvironment

java.lang.Objectorg.scoja.server.core.LazyStackedEnvironment
- All Implemented Interfaces:
- Environment
- public class LazyStackedEnvironment
- extends java.lang.Object
- implements Environment
- extends java.lang.Object
this implementation of Environment tries to make
mark() 55 and release() 55 as cheap as possible.
Consecutive mark() 55 executions, with no intervening calls
to define(String,String) 55 , involve no object construction.
| Field Summary | |
protected Environment |
local
|
protected int |
localMarks
|
protected java.util.HashMap |
map
|
protected int |
marks
|
| Fields inherited from interface org.scoja.server.core.Environment |
Q_UNKNOWN, UNKNOWN |
| Constructor Summary | |
LazyStackedEnvironment()
|
|
| Method Summary | |
void |
define(java.lang.String var,
QStr value)
Set a (new) value for variable var |
void |
define(java.lang.String var,
java.lang.String value)
Set a (new) value for variable var |
QStr |
definition(java.lang.String var)
Return the value give to var; null if
no var is undefined. |
boolean |
isDefined(java.lang.String var)
|
void |
mark()
Put a mark. |
void |
release()
Make this enviroment to forget al modification after the last execution of mark() 55 . |
java.lang.String |
toString()
Convert this Object to a human-readable String. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
map
protected final java.util.HashMap map
marks
protected int marks
local
protected Environment local
localMarks
protected int localMarks
| Constructor Detail |
LazyStackedEnvironment
public LazyStackedEnvironment()
| Method Detail |
mark
public void mark()
- Description copied from interface:
Environment - Put a mark. All modificatons (variables defined or redefined)
after executing this operation will be forgotten after
executing
Environment.release()55 .- Specified by:
markin interfaceEnvironment
release
public void release()
- Description copied from interface:
Environment - Make this enviroment to forget al modification after the last
execution of
Environment.mark()55 .- Specified by:
releasein interfaceEnvironment
define
public void define(java.lang.String var, java.lang.String value)
- Description copied from interface:
Environment - Set a (new)
valuefor variablevar- Specified by:
definein interfaceEnvironment
define
public void define(java.lang.String var, QStr value)
- Description copied from interface:
Environment - Set a (new)
valuefor variablevar- Specified by:
definein interfaceEnvironment
isDefined
public boolean isDefined(java.lang.String var)
- Specified by:
isDefinedin interfaceEnvironment
definition
public QStr definition(java.lang.String var)
- Description copied from interface:
Environment - Return the value give to
var;nullif novaris undefined.- Specified by:
definitionin interfaceEnvironment
toString
public java.lang.String toString()
- Description copied from class:
java.lang.Object - Convert this Object to a human-readable String.
There are no limits placed on how long this String
should be or what it should contain. We suggest you
make it as intuitive as possible to be able to place
it into System.out.println() 55
and such.
It is typical, but not required, to ensure that this method never completes abruptly with a java.lang.RuntimeException.
This method will be called when performing string concatenation with this object. If the result is
null, string concatenation will instead use"null".The default implementation returns
getClass().getName() + "@" + Integer.toHexString(hashCode()).
|
|||||||||
| Home >> All >> org >> scoja >> server >> [ core overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC
org.scoja.server.core.LazyStackedEnvironment