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,PsyString
@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
objects.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ContextActionContext action of theextractintervaloperator.static final ContextActionContext action of thegetintervaloperator.static final ContextActionContext action of theinsertoperator.static final ContextActionContext action of theinsertalloperator.static final ContextActionContext action of thepostchopoperator.static final ContextActionContext action of theprechopoperator.static final ContextActionContext action of theprependoperator.static final ContextActionContext action of theprependalloperator.static final ContextActionContext action of theputintervaloperator.static final ContextActionContext action of thereverseoperator.static final ContextActionContext action of thesetlengthoperator.Fields inherited from interface coneforest.psylla.core.PsyAppendable
PSY_APPEND, PSY_APPENDALLFields 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_TONAME, PSY_TOSTRING, PSY_TYPEFields inherited from interface coneforest.psylla.core.PsySequential
PSY_FORALLFields inherited from interface coneforest.psylla.core.PsyStreamable
PSY_STREAM -
Method Summary
Modifier and TypeMethodDescriptionvoiddelete(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.voidInserts the specifiedobjectinto this array at the position specified by a given index.psyClone()Returns a clone of this object.default voidpsyDelete(PsyInteger oIndex) Deletes a key or index and a value associated with it from this object.default PsyFormalStream<PsyObject>Returns aniterableenumeration of all the keys and values of this object.default TpsyExtract(PsyInteger oIndex) psyExtractInterval(PsyInteger oIndex, PsyInteger oCount) default TpsyGet(PsyInteger oIndex) Returns the element with given key or index.psyGetInterval(PsyInteger oIndex, PsyInteger oLength) default voidpsyInsert(PsyInteger oIndex, T o) Inserts the specifiedobjectinto this array at the position specified by a givenintegerindex.default voidpsyInsertAll(PsyInteger oIndex, PsyIterable<? extends T> oEnumeration) default PsyStreampsyKeys()Returns aniterableenumeration of all the keys of this object.default PsyBooleanpsyKnown(PsyInteger oIndex) Returns abooleanindicating whether given key or index exists in this object.default Tdefault Tdefault voidpsyPrepend(T o) Inserts the specifiedobjectinto this array at the beginning.default voidpsyPrependAll(PsyIterable<? extends T> oEnumeration) default voidpsyPut(PsyInteger oIndex, T o) Stores an element with given key or index.default voidpsyPutInterval(PsyInteger oIndex, PsyIterable<? extends T> oEnumeration) default PsyFormalArray<T>psyReplicate(PsyInteger oCount) default PsyFormalArray<T>voidpsySetLength(PsyInteger oLength) psySlice(PsyIterable<PsyInteger> oIndices) Returns a container of the same type as this object consisting of keys or indices from giveniterableand of associated values.default PsyFormalStream<T>Returns aniterableenumeration of all the values of this object.voiddefault StringReturns the syntactic representation of this object.default StringtoSyntaxStringHelper(Set<PsyContainer<T>> processed) Methods inherited from interface java.lang.Iterable
forEach, iterator, spliteratorMethods inherited from interface coneforest.psylla.core.PsyAppendable
psyAppend, psyAppendAllMethods inherited from interface coneforest.psylla.core.PsyClearable
psyClearMethods inherited from interface coneforest.psylla.core.PsyContainer
psyNewEmptyMethods inherited from interface coneforest.psylla.core.PsyIndexed
psyGetAllMethods 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, psyEq, psyHashCode, psyInstanceOf, psyNe, psySyntax, psyToName, psyToString, psyType, typeNameMethods inherited from interface coneforest.psylla.core.PsyStreamable
psyForAll
-
Field Details
-
PSY_EXTRACTINTERVAL
Context action of theextractintervaloperator. -
PSY_GETINTERVAL
Context action of thegetintervaloperator. -
PSY_INSERT
Context action of theinsertoperator. -
PSY_INSERTALL
Context action of theinsertalloperator. -
PSY_POSTCHOP
Context action of thepostchopoperator. -
PSY_PRECHOP
Context action of theprechopoperator. -
PSY_PREPEND
Context action of theprependoperator. -
PSY_PREPENDALL
Context action of theprependalloperator. -
PSY_PUTINTERVAL
Context action of theputintervaloperator. -
PSY_REVERSE
Context action of thereverseoperator. -
PSY_SETLENGTH
Context action of thesetlengthoperator.
-
-
Method Details
-
psyClone
PsyFormalArray<T> psyClone()Description copied from interface:PsyObjectReturns a clone of this object. -
psyReverse
- Throws:
PsyRangeCheckException
-
psyKnown
Description copied from interface:PsyIndexedReturns abooleanindicating whether given key or index exists in this object.- Specified by:
psyKnownin interfacePsyIndexed<PsyInteger,T extends PsyObject> - Parameters:
oIndex- a key or an index.- Returns:
- a result.
-
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:PsyIndexedReturns the element with given key or index.- Specified by:
psyGetin interfacePsyIndexed<PsyInteger,T extends PsyObject> - Parameters:
oIndex- a key or an index.- Returns:
- an element.
- 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: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<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 specifiedobjectinto this array at the position specified by a given index.- Parameters:
index- aintegerindex.o- aobject.- Throws:
PsyRangeCheckException- when TODO.
-
psyInsert
Inserts the specifiedobjectinto this array at the position specified by a givenintegerindex.- Parameters:
oIndex- anintegerindex.o- anobject.- Throws:
PsyRangeCheckException- when TODO.
-
psyInsertAll
default void psyInsertAll(PsyInteger oIndex, PsyIterable<? extends T> oEnumeration) throws PsyRangeCheckException - Throws:
PsyRangeCheckException
-
psyPrepend
Inserts the specifiedobjectinto 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:
psyReplicatein interfacePsyAppendable<T extends PsyObject>- Throws:
PsyLimitCheckExceptionPsyRangeCheckExceptionPsyUnsupportedException
-
psyPutInterval
default void psyPutInterval(PsyInteger oIndex, PsyIterable<? extends T> oEnumeration) throws PsyRangeCheckException - Throws:
PsyRangeCheckException
-
psyDelete
Description copied from interface:PsyIndexedDeletes a key or index and a value associated with it from this object.- Specified by:
psyDeletein 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:
psyExtractin 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:PsyIndexedReturns a container of the same type as this object consisting of keys or indices from giveniterableand of associated values.- Specified by:
psySlicein interfacePsyIndexed<PsyInteger,T extends PsyObject> - Parameters:
oIndices- an enumeration of keys.- Returns:
- a container.
- Throws:
PsyRangeCheckException- when the index is out of range.PsyLimitCheckException- when TODOPsyUnsupportedException- when TODO
-
psyKeys
Description copied from interface:PsyIndexedReturns aniterableenumeration of all the keys of this object.- Specified by:
psyKeysin interfacePsyIndexed<PsyInteger,T extends PsyObject> - Returns:
- an enumeration of keys.
-
psyValues
Description copied from interface:PsyIndexedReturns aniterableenumeration of all the values of this object.- Specified by:
psyValuesin interfacePsyIndexed<PsyInteger,T extends PsyObject> - Returns:
- an enumeration of values.
-
psyEntries
Description copied from interface:PsyIndexedReturns aniterableenumeration of all the keys and values of this object.- Specified by:
psyEntriesin interfacePsyIndexed<PsyInteger,T extends PsyObject> - Returns:
- an enumeration of entries.
-
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<T extends PsyObject>
-