Module coneforest.psylla
Package coneforest.psylla.core
Interface PsyIndexed<K extends PsyObject,V extends PsyObject>
- Type Parameters:
K
- a type of keys or indices.V
- a type of elements.
- All Superinterfaces:
PsyObject
- All Known Subinterfaces:
PsyFormalArray<T>
,PsyFormalDict<V>
- All Known Implementing Classes:
PsyArray
,PsyBitArray
,PsyConfigDict
,PsyDict
,PsyEnvironment
,PsyModule
,PsyNamespace
,PsyProc
,PsyStringBuffer
,PsySystemDict
@Type("indexed")
public interface PsyIndexed<K extends PsyObject,V extends PsyObject>
extends PsyObject
The representation of
indexed
, a type of the container whose elements are indexed.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ContextAction
Context action of thedelete
operator.static final ContextAction
Context action of theentries
operator.static final ContextAction
Context action of theextract
operator.static final ContextAction
Context action of theget
operator.static final ContextAction
Context action of thegetall
operator.static final ContextAction
Context action of thekeys
operator.static final ContextAction
Context action of theknown
operator.static final ContextAction
Context action of theput
operator.static final ContextAction
Context action of theslice
operator.static final ContextAction
Context action of thevalues
operator.Fields inherited from interface coneforest.psylla.core.PsyObject
PSY_CLONE, PSY_EQ, PSY_HASHCODE, PSY_INSTANCEOF, PSY_NE, PSY_TOSTRING, PSY_TOSTRINGBUFFER, PSY_TYPE
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Deletes a key or index and a value associated with it from this object.Returns aniterable
enumeration of all the keys and values of this object.psyExtract
(K oKey) Returns the element with given key or index.default PsyIterable
<V> psyGetAll
(PsyIterable<K> oKeys) psyKeys()
Returns aniterable
enumeration of all the keys of this object.Returns aboolean
indicating whether given key or index exists in this object.void
Stores an element with given key or index.PsyIndexed
<K, V> psySlice
(PsyIterable<K> oKeys) Returns a container of the same type as this object consisting of keys or indices from giveniterable
and of associated values.default PsyFormalStream
<V> Returns aniterable
enumeration of all the values of this object.Methods inherited from interface coneforest.psylla.core.PsyObject
convert, execute, invoke, psyClone, psyEq, psyHashCode, psyInstanceOf, psyNe, psySyntax, psyToString, psyToStringBuffer, psyType, toSyntaxString, typeName
-
Field Details
-
PSY_DELETE
Context action of thedelete
operator. -
PSY_ENTRIES
Context action of theentries
operator. -
PSY_EXTRACT
Context action of theextract
operator. -
PSY_GET
Context action of theget
operator. -
PSY_GETALL
Context action of thegetall
operator. -
PSY_KEYS
Context action of thekeys
operator. -
PSY_KNOWN
Context action of theknown
operator. -
PSY_PUT
Context action of theput
operator. -
PSY_SLICE
Context action of theslice
operator. -
PSY_VALUES
Context action of thevalues
operator.
-
-
Method Details
-
psyKnown
Returns aboolean
indicating whether given key or index exists in this object.- Parameters:
oKey
- a key or an index.- Returns:
- a
boolean
indicating whether given key or index exists in this object
-
psyGet
Returns the element with given key or index.- Parameters:
oKey
- a key or an index.- Returns:
- the element with given key or index
- Throws:
PsyRangeCheckException
- when index is out of range.PsyUndefinedException
- when the key is absent.
-
psyPut
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.- Parameters:
oKey
- a key or an index.oValue
- an element to be stored.- Throws:
PsyRangeCheckException
- when the index is out of range.
-
psyDelete
Deletes a key or index and a value associated with it from this object.- Parameters:
oKey
- a key or an index.- Throws:
PsyRangeCheckException
- when the index is out of range.PsyUndefinedException
- when the key is absent.
-
psyExtract
-
psySlice
PsyIndexed<K,V> psySlice(PsyIterable<K> oKeys) throws PsyRangeCheckException, PsyLimitCheckException, PsyUndefinedException, PsyUnsupportedException Returns a container of the same type as this object consisting of keys or indices from giveniterable
and of associated values.- 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:
PsyLimitCheckException
- when TODOPsyRangeCheckException
- when the index is out of range.PsyUndefinedException
- when the key is absent.PsyUnsupportedException
- when TODO
-
psyGetAll
default PsyIterable<V> psyGetAll(PsyIterable<K> oKeys) throws PsyRangeCheckException, PsyLimitCheckException, PsyUndefinedException, PsyUnsupportedException -
psyKeys
PsyFormalStream<K> psyKeys()Returns aniterable
enumeration of all the keys of this object.- Returns:
- an
iterable
enumeration of all the keys of this object
-
psyValues
Returns aniterable
enumeration of all the values of this object.- Returns:
- an
iterable
enumeration of all the values of this object
-
psyEntries
PsyFormalStream<PsyObject> psyEntries()Returns aniterable
enumeration of all the keys and values of this object.- Returns:
- an
iterable
enumeration of all the keys and values of this object
-