1 package org.ejen; 22 23 import java.util.Stack ; 24 import java.util.Hashtable ; 25 26 32 public class EjenContextsStack extends Stack { 33 private Hashtable _globalContext = new Hashtable (); 34 35 41 public EjenContext peekContext() { 42 return (EjenContext) peek(); 43 } 44 45 52 public EjenContext peekContext(int index) { 53 return (EjenContext) elementAt(index); 54 } 55 56 62 public EjenContext popContext() { 63 return (EjenContext) pop(); 64 } 65 66 71 public EjenContext pushContext(EjenContext ctx) { 72 return (EjenContext) (super.push(ctx)); 73 } 74 75 82 public Object globalGet(String name) { 83 return _globalContext.get(name); 84 } 85 86 94 public Object globalPut(String name, Object value) { 95 return _globalContext.put(name, value); 96 } 97 } 98 | Popular Tags |