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 ContextActionContext action of theundefoperator.Fields inherited from interface coneforest.psylla.core.PsyClearable
PSY_CLEARFields 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 -
Method Summary
Modifier and TypeMethodDescriptionkeys()booleandefault voidpsyClear()Clear this object.default voidDeletes a key or index and a value associated with it from this object.default PsyStreamReturns aniterableenumeration of all the keys and values of this object.default VpsyExtract(PsyString oKey) default voidpsyForAll(PsyObject oProc, PsyContext oContext) default VReturns the element with given key or index.default PsyFormalStream<PsyString> psyKeys()Returns aniterableenumeration of all the keys of this object.default PsyBooleanReturns abooleanindicating whether given key or index exists in this object.default voidStores 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 giveniterableand of associated values.default voidDeletes a key and associated value from this dictionary.voiddefault StringReturns the syntactic representation of this object.default StringtoSyntaxStringHelper(Set<PsyContainer<? extends PsyObject>> processed) voidMethods inherited from interface java.lang.Iterable
forEach, iterator, spliteratorMethods inherited from interface coneforest.psylla.core.PsyContainer
psyNewEmptyMethods inherited from interface coneforest.psylla.core.PsyIndexed
psyGetAll, psyValuesMethods inherited from interface coneforest.psylla.core.PsyIterable
psyStream, psyToArray, psyUniteMethods inherited from interface coneforest.psylla.core.PsyLengthy
isEmpty, length, psyIsEmpty, psyLengthMethods 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 theundefoperator.
-
-
Method Details
-
psyForAll
- Specified by:
psyForAllin interfacePsySequential<V extends PsyObject>- Specified by:
psyForAllin interfacePsyStreamable<V extends PsyObject>- Throws:
PsyErrorException
-
get
- Throws:
PsyUndefinedException
-
psyGet
Description copied from interface:PsyIndexedReturns the element with given key or index.- Specified by:
psyGetin 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:PsyIndexedStores an element with given key or index. InPsyFormalArraycontainers replaces existing element. InPsyFormalDictcontainers replaces an old or creates a new element associated with specified key.- Specified by:
psyPutin interfacePsyIndexed<PsyString,V extends PsyObject> - Parameters:
oKey- a key or an index.oValue- an element to be stored.
-
known
-
psyKnown
Description copied from interface:PsyIndexedReturns abooleanindicating whether given key or index exists in this object.- Specified by:
psyKnownin interfacePsyIndexed<PsyString,V extends PsyObject> - Parameters:
oKey- a key or an index.- Returns:
- a
booleanindicating whether given key or index exists in this object
-
undef
-
psyUndef
Deletes a key and associated value from this dictionary.- Parameters:
oKey- astringkey.
-
psyKeys
Description copied from interface:PsyIndexedReturns aniterableenumeration of all the keys of this object.- Specified by:
psyKeysin interfacePsyIndexed<PsyString,V extends PsyObject> - Returns:
- an
iterableenumeration of all the keys of this object
-
keys
-
psyDelete
Description copied from interface:PsyIndexedDeletes a key or index and a value associated with it from this object.- Specified by:
psyDeletein interfacePsyIndexed<PsyString,V extends PsyObject> - Parameters:
oKey- a key or an index.- Throws:
PsyUndefinedException- when the key is absent.
-
psyExtract
- Specified by:
psyExtractin interfacePsyIndexed<PsyString,V extends PsyObject> - Throws:
PsyUndefinedException
-
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 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
iterableand of associated values - Throws:
PsyUndefinedException- when the key is absent.
-
psyEntries
Description copied from interface:PsyIndexedReturns aniterableenumeration of all the keys and values of this object.- Specified by:
psyEntriesin interfacePsyIndexed<PsyString,V extends PsyObject> - Returns:
- an
iterableenumeration of all the keys and values of this object
-
toSyntaxString
Description copied from interface:PsyObjectReturns the syntactic representation of this object.- Specified by:
toSyntaxStringin interfacePsyObject- Returns:
- the syntactic representation of this object
-
toSyntaxStringHelper
- Specified by:
toSyntaxStringHelperin interfacePsyContainer<V extends PsyObject>
-
psyClear
default void psyClear()Description copied from interface:PsyClearableClear this object.- Specified by:
psyClearin interfacePsyClearable
-