Package coneforest.psylla.core
Interface PsyFormalDict<V extends PsyObject>
- Type Parameters:
V
- a type of contained values.
- All Superinterfaces:
Iterable<V>
,PsyClearable
,PsyContainer<V>
,PsyConvertableToName
,PsyConvertableToString
,PsyIndexed<PsyTextual,
,V> PsyIterable<V>
,PsyLengthy
,PsyObject
,PsySequential<V>
,PsyStreamable<V>
- All Known Implementing Classes:
PsyConfigDict
,PsyDict
,PsyErrorDict
,PsyModule
,PsyNamespace
,PsyRomanNumerals
,PsySystemDict
public interface PsyFormalDict<V extends PsyObject>
extends PsyContainer<V>, PsyIndexed<PsyTextual,V>, PsySequential<V>
A representation of
formaldict
, an abstraction of a dictionary.-
Field Summary
Fields -
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.default PsyFormalArray<V>
psyGetAll
(PsyIterable<PsyTextual> oEnumeration) 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
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
-
OPERATORS
-
-
Method Details
-
psyForAll
- Specified by:
psyForAll
in interfacePsySequential<V extends PsyObject>
- Specified by:
psyForAll
in interfacePsyStreamable<V extends PsyObject>
- Throws:
PsyErrorException
-
get
- Throws:
PsyErrorException
-
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:
PsyErrorException
- when index is out of range.
-
psyGetAll
- Specified by:
psyGetAll
in interfacePsyIndexed<PsyTextual,
V extends PsyObject> - Throws:
PsyErrorException
-
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:
PsyErrorException
- when key is absent or index is out of range.
-
psyExtract
- Specified by:
psyExtract
in interfacePsyIndexed<PsyTextual,
V extends PsyObject> - Throws:
PsyErrorException
-
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:
PsyErrorException
- when key is absent or index is out of range.
-
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
-