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 ContextAction
Context action of thedict
operator.static final ContextAction
Context action of thedicttomark
operator.Fields inherited from interface coneforest.psylla.core.PsyClearable
PSY_CLEAR
Fields inherited from interface coneforest.psylla.core.PsyFormalDict
PSY_UNDEF
Fields 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_VALUES
Fields inherited from interface coneforest.psylla.core.PsyLengthy
PSY_ISEMPTY, PSY_LENGTH
Fields inherited from interface coneforest.psylla.core.PsyObject
PSY_CLONE, PSY_EQ, PSY_HASHCODE, PSY_INSTANCEOF, PSY_NE, PSY_TOSTRING, PSY_TOSTRINGBUFFER, PSY_TYPE
Fields inherited from interface coneforest.psylla.core.PsySequential
PSY_FORALL
Fields inherited from interface coneforest.psylla.core.PsyStreamable
PSY_STREAM
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
isEmpty()
iterator()
keys()
boolean
int
length()
Returns a length of this object.void
psyClear()
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 giveniterable
and of associated values.void
void
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
Methods inherited from interface coneforest.psylla.core.PsyContainer
psyNewEmpty
Methods inherited from interface coneforest.psylla.core.PsyFormalDict
psyDelete, psyEntries, psyExtract, psyForAll, psyGet, psyKeys, psyKnown, psyPut, psyUndef, toSyntaxString, toSyntaxStringHelper
Methods inherited from interface coneforest.psylla.core.PsyIndexed
psyGetAll, psyValues
Methods inherited from interface coneforest.psylla.core.PsyIterable
psyToArray, psyUnite
Methods inherited from interface coneforest.psylla.core.PsyLengthy
psyIsEmpty, psyLength
Methods 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 thedict
operator. -
PSY_DICTTOMARK
Context action of thedicttomark
operator.
-
-
Constructor Details
-
PsyDict
public PsyDict()Creates a new emptydict
. -
PsyDict
Creates a newdict
wrapped around the given hash map.- Parameters:
dict
- a given hash map.
-
-
Method Details
-
psyClone
Description copied from interface:PsyObject
Returns a clone of this object. -
get
- Specified by:
get
in interfacePsyFormalDict<PsyObject>
- Throws:
PsyUndefinedException
-
put
- Specified by:
put
in interfacePsyFormalDict<PsyObject>
-
undef
- Specified by:
undef
in interfacePsyFormalDict<PsyObject>
-
known
- Specified by:
known
in interfacePsyFormalDict<PsyObject>
-
iterator
-
length
public int length()Description copied from interface:PsyLengthy
Returns a length of this object.- Specified by:
length
in interfacePsyLengthy
- Returns:
- a length of this object
-
isEmpty
public boolean isEmpty()Description copied from interface:PsyLengthy
- Specified by:
isEmpty
in interfacePsyLengthy
-
psyClear
public void psyClear()Description copied from interface:PsyClearable
Clear this object.- Specified by:
psyClear
in interfacePsyClearable
- Specified by:
psyClear
in interfacePsyFormalDict<PsyObject>
-
psySlice
Description copied from interface:PsyIndexed
Returns a container of the same type as this object consisting of keys or indices from giveniterable
and of associated values.- Specified by:
psySlice
in interfacePsyFormalDict<PsyObject>
- Specified by:
psySlice
in 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
iterable
and of associated values - Throws:
PsyUndefinedException
- when the key is absent.
-
keys
- Specified by:
keys
in interfacePsyFormalDict<PsyObject>
-
psyStream
- Specified by:
psyStream
in interfacePsyIterable<PsyObject>
- Specified by:
psyStream
in interfacePsyStreamable<PsyObject>
-