Module coneforest.psylla
Package coneforest.psylla.core
Interface PsyFormalArray<T extends PsyObject>
- Type Parameters:
T
- a type of contained objects.
- All Superinterfaces:
Iterable<T>
,PsyAppendable<T>
,PsyClearable
,PsyContainer<T>
,PsyIndexed<PsyInteger,
,T> PsyIterable<T>
,PsyLengthy
,PsyObject
,PsySequential<T>
,PsyStreamable<T>
- All Known Implementing Classes:
PsyArray
,PsyBitArray
,PsyProc
,PsyStringBuffer
@Type("formalarray")
public interface PsyFormalArray<T extends PsyObject>
extends PsyAppendable<T>, PsyContainer<T>, PsyIndexed<PsyInteger,T>, PsySequential<T>
The representation of
formalarray
, an abstraction of an array composed of
object
s.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ContextAction
Context action of theextractinterval
operator.static final ContextAction
Context action of thegetinterval
operator.static final ContextAction
Context action of theinsert
operator.static final ContextAction
Context action of theinsertall
operator.static final ContextAction
Context action of thepostchop
operator.static final ContextAction
Context action of theprechop
operator.static final ContextAction
Context action of theprepend
operator.static final ContextAction
Context action of theprependall
operator.static final ContextAction
Context action of theputinterval
operator.static final ContextAction
Context action of thereverse
operator.static final ContextAction
Context action of thesetlength
operator.Fields inherited from interface coneforest.psylla.core.PsyAppendable
PSY_APPEND, PSY_APPENDALL, PSY_REPLICATE
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 TypeMethodDescriptionvoid
delete
(int index) Removes the element at the specified position in this array.extract
(int index) get
(int index) Returns the element at the specified position in this array.void
Inserts the specifiedobject
into this array at the position specified by a given index.psyClone()
Returns a clone of this object.default void
psyDelete
(PsyInteger oIndex) Deletes a key or index and a value associated with it from this object.default PsyFormalStream
<PsyObject> Returns aniterable
enumeration of all the keys and values of this object.default T
psyExtract
(PsyInteger oIndex) psyExtractInterval
(PsyInteger oIndex, PsyInteger oCount) default T
psyGet
(PsyInteger oIndex) Returns the element with given key or index.psyGetInterval
(PsyInteger oIndex, PsyInteger oLength) default void
psyInsert
(PsyInteger oIndex, T o) Inserts the specifiedobject
into this array at the position specified by a giveninteger
index.default void
psyInsertAll
(PsyInteger oIndex, PsyIterable<? extends T> oEnumeration) default PsyFormalStream
<PsyInteger> psyKeys()
Returns aniterable
enumeration of all the keys of this object.default PsyBoolean
psyKnown
(PsyInteger oIndex) Returns aboolean
indicating whether given key or index exists in this object.default T
default T
default void
psyPrepend
(T o) Inserts the specifiedobject
into this array at the beginning.default void
psyPrependAll
(PsyIterable<? extends T> oEnumeration) default void
psyPut
(PsyInteger oIndex, T o) Stores an element with given key or index.default void
psyPutInterval
(PsyInteger oIndex, PsyIterable<? extends T> oEnumeration) default PsyFormalArray
<T> psyReplicate
(PsyInteger oCount) default PsyFormalArray
<T> void
psySetLength
(PsyInteger oLength) psySlice
(PsyIterable<PsyInteger> oIndices) Returns a container of the same type as this object consisting of keys or indices from giveniterable
and of associated values.default PsyFormalStream
<T> Returns aniterable
enumeration of all the values of this object.void
default String
Returns the syntactic representation of this object.default String
toSyntaxStringHelper
(Set<PsyContainer<? extends PsyObject>> processed) Methods inherited from interface java.lang.Iterable
forEach, iterator, spliterator
Methods inherited from interface coneforest.psylla.core.PsyAppendable
psyAppend, psyAppendAll
Methods inherited from interface coneforest.psylla.core.PsyClearable
psyClear
Methods inherited from interface coneforest.psylla.core.PsyContainer
psyNewEmpty
Methods inherited from interface coneforest.psylla.core.PsyIndexed
psyGetAll
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, psyEq, psyHashCode, psyInstanceOf, psyNe, psySyntax, psyToString, psyToStringBuffer, psyType, typeName
Methods inherited from interface coneforest.psylla.core.PsyStreamable
psyForAll
-
Field Details
-
PSY_EXTRACTINTERVAL
Context action of theextractinterval
operator. -
PSY_GETINTERVAL
Context action of thegetinterval
operator. -
PSY_INSERT
Context action of theinsert
operator. -
PSY_INSERTALL
Context action of theinsertall
operator. -
PSY_POSTCHOP
Context action of thepostchop
operator. -
PSY_PRECHOP
Context action of theprechop
operator. -
PSY_PREPEND
Context action of theprepend
operator. -
PSY_PREPENDALL
Context action of theprependall
operator. -
PSY_PUTINTERVAL
Context action of theputinterval
operator. -
PSY_REVERSE
Context action of thereverse
operator. -
PSY_SETLENGTH
Context action of thesetlength
operator.
-
-
Method Details
-
psyClone
PsyFormalArray<T> psyClone()Description copied from interface:PsyObject
Returns a clone of this object. -
psyReverse
- Throws:
PsyRangeCheckException
-
psyKnown
Description copied from interface:PsyIndexed
Returns aboolean
indicating whether given key or index exists in this object.- Specified by:
psyKnown
in interfacePsyIndexed<PsyInteger,
T extends PsyObject> - Parameters:
oIndex
- a key or an index.- Returns:
- a
boolean
indicating whether given key or index exists in this object
-
get
Returns the element at the specified position in this array.- Parameters:
index
- the index of the element.- Returns:
- the element at the specified position in this list.
- Throws:
PsyRangeCheckException
- if the index is out of range.
-
psyGet
Description copied from interface:PsyIndexed
Returns the element with given key or index.- Specified by:
psyGet
in interfacePsyIndexed<PsyInteger,
T extends PsyObject> - Parameters:
oIndex
- a key or an index.- Returns:
- the element with given key or index
- Throws:
PsyRangeCheckException
- when index is out of range.
-
psyGetInterval
PsyFormalArray<T> psyGetInterval(PsyInteger oIndex, PsyInteger oLength) throws PsyRangeCheckException - Throws:
PsyRangeCheckException
-
put
- Throws:
PsyRangeCheckException
-
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<PsyInteger,
T extends PsyObject> - Parameters:
oIndex
- a key or an index.o
- an element to be stored.- Throws:
PsyRangeCheckException
- when the index is out of range.
-
insert
Inserts the specifiedobject
into this array at the position specified by a given index.- Parameters:
index
- ainteger
index.o
- aobject
.- Throws:
PsyRangeCheckException
- when TODO.
-
psyInsert
Inserts the specifiedobject
into this array at the position specified by a giveninteger
index.- Parameters:
oIndex
- aninteger
index.o
- anobject
.- Throws:
PsyRangeCheckException
- when TODO.
-
psyInsertAll
default void psyInsertAll(PsyInteger oIndex, PsyIterable<? extends T> oEnumeration) throws PsyRangeCheckException - Throws:
PsyRangeCheckException
-
psyPrepend
Inserts the specifiedobject
into this array at the beginning.- Parameters:
o
- anobject
.- Throws:
PsyRangeCheckException
- when TODO.
-
psyPreChop
- Throws:
PsyRangeCheckException
-
psyPostChop
- Throws:
PsyRangeCheckException
-
psyPrependAll
- Throws:
PsyRangeCheckException
-
psyReplicate
default PsyFormalArray<T> psyReplicate(PsyInteger oCount) throws PsyLimitCheckException, PsyRangeCheckException, PsyUnsupportedException - Specified by:
psyReplicate
in interfacePsyAppendable<T extends PsyObject>
- Throws:
PsyLimitCheckException
PsyRangeCheckException
PsyUnsupportedException
-
psyPutInterval
default void psyPutInterval(PsyInteger oIndex, PsyIterable<? extends T> oEnumeration) throws PsyRangeCheckException - Throws:
PsyRangeCheckException
-
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<PsyInteger,
T extends PsyObject> - Parameters:
oIndex
- a key or an index.- Throws:
PsyRangeCheckException
- when the index is out of range.
-
delete
Removes the element at the specified position in this array.- Parameters:
index
- the index of the element to be removed.- Throws:
PsyRangeCheckException
- if the index is out of range.
-
psyExtract
- Specified by:
psyExtract
in interfacePsyIndexed<PsyInteger,
T extends PsyObject> - Throws:
PsyRangeCheckException
-
psySetLength
-
extract
- Throws:
PsyRangeCheckException
-
psyExtractInterval
PsyFormalArray<T> psyExtractInterval(PsyInteger oIndex, PsyInteger oCount) throws PsyRangeCheckException - Throws:
PsyRangeCheckException
-
psySlice
PsyFormalArray<T> psySlice(PsyIterable<PsyInteger> oIndices) throws PsyRangeCheckException, PsyLimitCheckException, PsyUnsupportedException 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<PsyInteger,
T extends PsyObject> - Parameters:
oIndices
- 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:
PsyRangeCheckException
- when the index is out of range.PsyLimitCheckException
- when TODOPsyUnsupportedException
- when TODO
-
psyKeys
Description copied from interface:PsyIndexed
Returns aniterable
enumeration of all the keys of this object.- Specified by:
psyKeys
in interfacePsyIndexed<PsyInteger,
T extends PsyObject> - Returns:
- an
iterable
enumeration of all the keys of this object
-
psyValues
Description copied from interface:PsyIndexed
Returns aniterable
enumeration of all the values of this object.- Specified by:
psyValues
in interfacePsyIndexed<PsyInteger,
T extends PsyObject> - Returns:
- an
iterable
enumeration of all the values of this object
-
psyEntries
Description copied from interface:PsyIndexed
Returns aniterable
enumeration of all the keys and values of this object.- Specified by:
psyEntries
in interfacePsyIndexed<PsyInteger,
T 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<T extends PsyObject>
-