Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.scoja.server.core
Class StackedEnvironment  view StackedEnvironment download StackedEnvironment.java

java.lang.Object
  extended byorg.scoja.server.core.StackedEnvironment
All Implemented Interfaces:
Environment

public class StackedEnvironment
extends java.lang.Object
implements Environment

A simple implementation of Environment with no special emphasis in any operation.


Field Summary
private static int INITIAL_FRAME_SIZE
           
protected  java.util.HashMap[] stack
           
protected  int top
           
 
Fields inherited from interface org.scoja.server.core.Environment
Q_UNKNOWN, UNKNOWN
 
Constructor Summary
StackedEnvironment()
           
 
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

INITIAL_FRAME_SIZE

private static final int INITIAL_FRAME_SIZE
See Also:
Constant Field Values

stack

protected java.util.HashMap[] stack

top

protected int top
Constructor Detail

StackedEnvironment

public StackedEnvironment()
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:
mark in interface Environment

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:
release in interface Environment

isDefined

public boolean isDefined(java.lang.String var)
Specified by:
isDefined in interface Environment

definition

public QStr definition(java.lang.String var)
Description copied from interface: Environment
Return the value give to var; null if no var is undefined.

Specified by:
definition in interface Environment

define

public void define(java.lang.String var,
                   java.lang.String value)
Description copied from interface: Environment
Set a (new) value for variable var

Specified by:
define in interface Environment

define

public void define(java.lang.String var,
                   QStr value)
Description copied from interface: Environment
Set a (new) value for variable var

Specified by:
define in interface Environment

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()).