Package coneforest.psylla
Class DictStack
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractList<E>
-
- java.util.ArrayList<E>
-
- coneforest.psylla.Stack<PsyFormalDict<PsyObject>>
-
- coneforest.psylla.DictStack
-
- All Implemented Interfaces:
Serializable,Cloneable,Iterable<PsyFormalDict<PsyObject>>,Collection<PsyFormalDict<PsyObject>>,List<PsyFormalDict<PsyObject>>,RandomAccess
public class DictStack extends Stack<PsyFormalDict<PsyObject>>
An interpreter’s dictionary stack.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description DictStack()Creates a new dictionary stack with two dictionaries in it (system and user dictionaries).
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidbegin(PsyFormalDict oDict)PsyNamespacecurrentNamespace()voidend()<T extends PsyObject>
Tload(PsyTextual oKey)<T extends PsyObject>
Tload(String key)voidpsyStore(PsyTextual oKey, PsyObject oValue)voidstore(String key, PsyObject oValue)PsyFormalDictwhere(PsyTextual oKey)PsyFormalDictwhere(String key)-
Methods inherited from class java.util.ArrayList
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, equals, forEach, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeIf, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSize
-
Methods inherited from class java.util.AbstractCollection
containsAll, toString
-
Methods inherited from interface java.util.Collection
parallelStream, stream, toArray
-
Methods inherited from interface java.util.List
containsAll
-
-
-
-
Constructor Detail
-
DictStack
public DictStack() throws PsyExceptionCreates a new dictionary stack with two dictionaries in it (system and user dictionaries).- Throws:
PsyException- when the error occur.
-
-
Method Detail
-
load
public <T extends PsyObject> T load(String key) throws PsyException
- Throws:
PsyException
-
load
public <T extends PsyObject> T load(PsyTextual oKey) throws PsyException
- Throws:
PsyException
-
where
public PsyFormalDict where(String key)
-
where
public PsyFormalDict where(PsyTextual oKey)
-
currentNamespace
public PsyNamespace currentNamespace()
-
psyStore
public void psyStore(PsyTextual oKey, PsyObject oValue)
-
begin
public void begin(PsyFormalDict oDict)
-
end
public void end() throws PsyDictStackUnderflowException- Throws:
PsyDictStackUnderflowException
-
-