Package coneforest.psylla
Class DictStack
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractList<E>
-
- java.util.ArrayList<E>
-
- coneforest.psylla.Stack<PsyDictlike<PsyObject>>
-
- coneforest.psylla.DictStack
-
- All Implemented Interfaces:
Serializable
,Cloneable
,Iterable<PsyDictlike<PsyObject>>
,Collection<PsyDictlike<PsyObject>>
,List<PsyDictlike<PsyObject>>
,RandomAccess
public class DictStack extends Stack<PsyDictlike<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 PsyNamespace
currentNamespace()
<T extends PsyObject>
Tload(PsyStringy oKey)
<T extends PsyObject>
Tload(String key)
void
psyBegin(PsyDictlike oDict)
void
psyEnd()
void
psyStore(PsyStringy oKey, PsyObject oValue)
void
store(String key, PsyObject oValue)
PsyDictlike
where(PsyStringy oKey)
PsyDictlike
where(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 PsyException
Creates 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(PsyStringy oKey) throws PsyException
- Throws:
PsyException
-
where
public PsyDictlike where(String key)
-
where
public PsyDictlike where(PsyStringy oKey)
-
currentNamespace
public PsyNamespace currentNamespace()
-
psyStore
public void psyStore(PsyStringy oKey, PsyObject oValue)
-
psyBegin
public void psyBegin(PsyDictlike oDict)
-
psyEnd
public void psyEnd() throws PsyDictStackUnderflowException
- Throws:
PsyDictStackUnderflowException
-
-