Module coneforest.psylla
Package coneforest.psylla.core
Interface PsyFormalDict<V extends PsyObject>
- Type Parameters:
V
- a type of contained values.
- All Superinterfaces:
Iterable<V>
,PsyClearable
,PsyContainer<V>
,PsyIndexed<PsyString,
,V> PsyIterable<V>
,PsyLengthy
,PsyObject
,PsySequential<V>
,PsyStreamable<V>
- All Known Implementing Classes:
PsyConfigDict
,PsyDict
,PsyEnvironment
,PsyModule
,PsyNamespace
,PsySystemDict
@Type("formaldict")
public interface PsyFormalDict<V extends PsyObject>
extends PsyContainer<V>, PsyIndexed<PsyString,V>, PsySequential<V>
The representation of
formaldict
, an abstraction of a dictionary.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ContextAction
Context action of theundef
operator.Fields inherited from interface coneforest.psylla.core.PsyClearable
PSY_CLEAR
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
-
Method Summary
Modifier and TypeMethodDescriptionkeys()
boolean
default void
psyClear()
Clear this object.default void
Deletes a key or index and a value associated with it from this object.default PsyStream
Returns aniterable
enumeration of all the keys and values of this object.default V
psyExtract
(PsyString oKey) default void
psyForAll
(PsyObject oProc, PsyContext oContext) default V
Returns the element with given key or index.default PsyFormalStream
<PsyString> psyKeys()
Returns aniterable
enumeration of all the keys of this object.default PsyBoolean
Returns aboolean
indicating whether given key or index exists in this object.default void
Stores an element with given key or index.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.default void
Deletes a key and associated value from this dictionary.void
default String
Returns the syntactic representation of this object.default String
toSyntaxStringHelper
(Set<PsyContainer<? extends PsyObject>> processed) void
Methods inherited from interface java.lang.Iterable
forEach, iterator, spliterator
Methods inherited from interface coneforest.psylla.core.PsyContainer
psyNewEmpty
Methods inherited from interface coneforest.psylla.core.PsyIndexed
psyGetAll, psyValues
Methods inherited from interface coneforest.psylla.core.PsyIterable
psyStream, psyToArray, psyUnite
Methods inherited from interface coneforest.psylla.core.PsyLengthy
isEmpty, length, psyIsEmpty, psyLength
Methods inherited from interface coneforest.psylla.core.PsyObject
convert, execute, invoke, psyClone, psyEq, psyHashCode, psyInstanceOf, psyNe, psySyntax, psyToString, psyToStringBuffer, psyType, typeName
-
Field Details
-
PSY_UNDEF
Context action of theundef
operator.
-
-
Method Details
-
psyForAll
- Specified by:
psyForAll
in interfacePsySequential<V extends PsyObject>
- Specified by:
psyForAll
in interfacePsyStreamable<V extends PsyObject>
- Throws:
PsyErrorException
-
get
- Throws:
PsyUndefinedException
-
psyGet
Description copied from interface:PsyIndexed
Returns the element with given key or index.- Specified by:
psyGet
in interfacePsyIndexed<PsyString,
V extends PsyObject> - Parameters:
oKey
- a key or an index.- Returns:
- the element with given key or index
- Throws:
PsyUndefinedException
- when the key is absent.
-
put
-
psyPut
Description copied from interface:PsyIndexed
Stores an element with given key or index. InPsyFormalArray
containers replaces existing element. InPsyFormalDict
containers replaces an old or creates a new element associated with specified key.- Specified by:
psyPut
in interfacePsyIndexed<PsyString,
V extends PsyObject> - Parameters:
oKey
- a key or an index.oValue
- an element to be stored.
-
known
-
psyKnown
Description copied from interface:PsyIndexed
Returns aboolean
indicating whether given key or index exists in this object.- Specified by:
psyKnown
in interfacePsyIndexed<PsyString,
V extends PsyObject> - Parameters:
oKey
- a key or an index.- Returns:
- a
boolean
indicating whether given key or index exists in this object
-
undef
-
psyUndef
Deletes a key and associated value from this dictionary.- Parameters:
oKey
- astring
key.
-
psyKeys
Description copied from interface:PsyIndexed
Returns aniterable
enumeration of all the keys of this object.- Specified by:
psyKeys
in interfacePsyIndexed<PsyString,
V extends PsyObject> - Returns:
- an
iterable
enumeration of all the keys of this object
-
keys
-
psyDelete
Description copied from interface:PsyIndexed
Deletes a key or index and a value associated with it from this object.- Specified by:
psyDelete
in interfacePsyIndexed<PsyString,
V extends PsyObject> - Parameters:
oKey
- a key or an index.- Throws:
PsyUndefinedException
- when the key is absent.
-
psyExtract
- Specified by:
psyExtract
in interfacePsyIndexed<PsyString,
V extends PsyObject> - Throws:
PsyUndefinedException
-
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 interfacePsyIndexed<PsyString,
V extends 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.
-
psyEntries
Description copied from interface:PsyIndexed
Returns aniterable
enumeration of all the keys and values of this object.- Specified by:
psyEntries
in interfacePsyIndexed<PsyString,
V extends PsyObject> - Returns:
- an
iterable
enumeration of all the keys and values of this object
-
toSyntaxString
Description copied from interface:PsyObject
Returns the syntactic representation of this object.- Specified by:
toSyntaxString
in interfacePsyObject
- Returns:
- the syntactic representation of this object
-
toSyntaxStringHelper
- Specified by:
toSyntaxStringHelper
in interfacePsyContainer<V extends PsyObject>
-
psyClear
default void psyClear()Description copied from interface:PsyClearable
Clear this object.- Specified by:
psyClear
in interfacePsyClearable
-