java.lang.Object
coneforest.psylla.core.PsyDict
- All Implemented Interfaces:
PsyClearable,PsyContainer<PsyObject>,PsyFormalDict<PsyObject>,PsyIndexed<PsyString,,PsyObject> PsyIterable<PsyObject>,PsyLengthy,PsyObject,PsySequential<PsyObject>,PsyStreamable<PsyObject>,Iterable<PsyObject>
- Direct Known Subclasses:
PsyModule,PsyNamespace
The representation of
dict, a dictionary.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ContextActionContext action of thedictoperator.static final ContextActionContext action of thedicttomarkoperator.Fields inherited from interface coneforest.psylla.core.PsyClearable
PSY_CLEARFields inherited from interface coneforest.psylla.core.PsyFormalDict
PSY_UNDEFFields inherited from interface coneforest.psylla.core.PsyIndexed
PSY_DELETE, PSY_ENTRIES, PSY_EXTRACT, PSY_GET, PSY_GETALL, PSY_KEYS, PSY_KNOWN, PSY_PUT, PSY_SLICE, PSY_VALUESFields inherited from interface coneforest.psylla.core.PsyLengthy
PSY_ISEMPTY, PSY_LENGTHFields inherited from interface coneforest.psylla.core.PsyObject
PSY_CLONE, PSY_EQ, PSY_HASHCODE, PSY_INSTANCEOF, PSY_NE, PSY_TOSTRING, PSY_TOSTRINGBUFFER, PSY_TYPEFields inherited from interface coneforest.psylla.core.PsySequential
PSY_FORALLFields inherited from interface coneforest.psylla.core.PsyStreamable
PSY_STREAM -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanisEmpty()Returns a boolean indicating if this container is empty (has zero length).iterator()keys()booleanintlength()Returns a length of this object.voidpsyClear()Clear this object.psyClone()Returns a clone of this object.psySlice(PsyIterable<PsyString> oKeys) Returns a container of the same type as this object consisting of keys or indices from giveniterableand of associated values.voidvoidMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliteratorMethods inherited from interface coneforest.psylla.core.PsyContainer
psyNewEmptyMethods inherited from interface coneforest.psylla.core.PsyFormalDict
psyDelete, psyEntries, psyExtract, psyForAll, psyGet, psyKeys, psyKnown, psyPut, psyUndef, toSyntaxString, toSyntaxStringHelperMethods inherited from interface coneforest.psylla.core.PsyIndexed
psyGetAll, psyValuesMethods inherited from interface coneforest.psylla.core.PsyIterable
psyToArray, psyUniteMethods inherited from interface coneforest.psylla.core.PsyLengthy
psyIsEmpty, psyLengthMethods inherited from interface coneforest.psylla.core.PsyObject
convert, execute, invoke, psyEq, psyHashCode, psyInstanceOf, psyNe, psySyntax, psyToString, psyToStringBuffer, psyType, typeName
-
Field Details
-
PSY_DICT
Context action of thedictoperator. -
PSY_DICTTOMARK
Context action of thedicttomarkoperator.
-
-
Constructor Details
-
PsyDict
public PsyDict()Creates a new emptydict. -
PsyDict
Creates a newdictwrapped around the given hash map.- Parameters:
dict- a given hash map.
-
-
Method Details
-
psyClone
Description copied from interface:PsyObjectReturns a clone of this object. -
get
- Specified by:
getin interfacePsyFormalDict<PsyObject>- Throws:
PsyUndefinedException
-
put
- Specified by:
putin interfacePsyFormalDict<PsyObject>
-
undef
- Specified by:
undefin interfacePsyFormalDict<PsyObject>
-
known
- Specified by:
knownin interfacePsyFormalDict<PsyObject>
-
iterator
-
length
public int length()Description copied from interface:PsyLengthyReturns a length of this object.- Specified by:
lengthin interfacePsyLengthy- Returns:
- a length of this object
-
isEmpty
public boolean isEmpty()Description copied from interface:PsyLengthyReturns a boolean indicating if this container is empty (has zero length).- Specified by:
isEmptyin interfacePsyLengthy- Returns:
- a boolean indicating if this container is empty (has zero length)
-
psyClear
public void psyClear()Description copied from interface:PsyClearableClear this object.- Specified by:
psyClearin interfacePsyClearable- Specified by:
psyClearin interfacePsyFormalDict<PsyObject>
-
psySlice
Description copied from interface:PsyIndexedReturns a container of the same type as this object consisting of keys or indices from giveniterableand of associated values.- Specified by:
psySlicein interfacePsyFormalDict<PsyObject>- Specified by:
psySlicein interfacePsyIndexed<PsyString,PsyObject> - Parameters:
oKeys- an enumeration of keys.- Returns:
- a container of the same type as this object consisting of keys or indices from given
iterableand of associated values - Throws:
PsyUndefinedException- when the key is absent.
-
keys
- Specified by:
keysin interfacePsyFormalDict<PsyObject>
-
psyStream
- Specified by:
psyStreamin interfacePsyIterable<PsyObject>- Specified by:
psyStreamin interfacePsyStreamable<PsyObject>
-