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<PsyTextual,
,V> PsyIterable<V>
,PsyLengthy
,PsyObject
,PsySequential<V>
,PsyStreamable<V>
- All Known Implementing Classes:
PsyConfigDict
,PsyDict
,PsyErrorDict
,PsyModule
,PsyNamespace
,PsySystemDict
@Type("formaldict")
public interface PsyFormalDict<V extends PsyObject>
extends PsyContainer<V>, PsyIndexed<PsyTextual,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_TONAME, PSY_TOSTRING, 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 TypeMethodDescriptionboolean
default void
psyClear()
Clear this object.default void
psyDelete
(PsyTextual oKey) 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
(PsyTextual oKey) default void
psyForAll
(PsyObject oProc, PsyContext oContext) default V
psyGet
(PsyTextual oKey) Returns the element with given key or index.psyKeys()
Returns aniterable
enumeration of all the keys of this object.default PsyBoolean
psyKnown
(PsyTextual oKey) Returns aboolean
indicating whether given key or index exists in this object.default void
psyPut
(PsyTextual oKey, V oValue) Stores an element with given key or index.psySlice
(PsyIterable<PsyTextual> oEnumeration) Returns a container of the same type as this object consisting of keys or indices from giveniterable
and of associated values.default void
psyUndef
(PsyTextual oKey) Deletes a key and associated value from this dictionary.void
default String
default String
toSyntaxStringHelper
(Set<PsyContainer<V>> 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, psyToName, psyToString, 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<PsyTextual,
V extends PsyObject> - Parameters:
oKey
- a key or an index.- Returns:
- an element.
- 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<PsyTextual,
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<PsyTextual,
V extends PsyObject> - Parameters:
oKey
- a key or an index.- Returns:
- a result.
-
undef
-
psyUndef
Deletes a key and associated value from this dictionary.- Parameters:
oKey
- atextual
key.
-
psyKeys
PsyFormalStream<PsyTextual> psyKeys()Description copied from interface:PsyIndexed
Returns aniterable
enumeration of all the keys of this object.- Specified by:
psyKeys
in interfacePsyIndexed<PsyTextual,
V extends PsyObject> - Returns:
- an enumeration of 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<PsyTextual,
V extends PsyObject> - Parameters:
oKey
- a key or an index.- Throws:
PsyUndefinedException
- when the key is absent.
-
psyExtract
- Specified by:
psyExtract
in interfacePsyIndexed<PsyTextual,
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<PsyTextual,
V extends PsyObject> - Parameters:
oEnumeration
- an enumeration of keys.- Returns:
- a container.
- 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<PsyTextual,
V extends PsyObject> - Returns:
- an enumeration of entries.
-
toSyntaxString
- Specified by:
toSyntaxString
in interfacePsyObject
-
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
-