Package coneforest.psylla.core
Class PsyArray
java.lang.Object
coneforest.psylla.core.PsyArray
- All Implemented Interfaces:
PsyAppendable<PsyObject>
,PsyClearable
,PsyContainer<PsyObject>
,PsyConvertableToName
,PsyConvertableToString
,PsyFormalArray<PsyObject>
,PsyIndexed<PsyInteger,
,PsyObject> PsyIterable<PsyObject>
,PsyLengthy
,PsyObject
,PsySequential<PsyObject>
,PsyStreamable<PsyObject>
,Iterable<PsyObject>
- Direct Known Subclasses:
PsyProc
A representation of
array
object.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
delete
(int indexValue) extract
(int indexValue) get
(int index) void
Inserts the specifiedobject
into this array at the position specified by a given index.iterator()
int
length()
Returns a length of this object.void
Appends a givenobject
to this container.psyBinarySearch
(PsyObject o, PsyProc oComparator, PsyContext oContext) void
psyClear()
Clear this object.psyClone()
Returns a clone of this object.psyExtractInterval
(PsyInteger oStart, PsyInteger oCount) psyGetInterval
(PsyInteger oStart, PsyInteger oCount) 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.void
psySort
(PsyProc oComparator, PsyContext oContext) void
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
Methods inherited from interface coneforest.psylla.core.PsyAppendable
psyAppendAll
Methods inherited from interface coneforest.psylla.core.PsyContainer
psyNewEmpty
Methods inherited from interface coneforest.psylla.core.PsyFormalArray
psyDelete, psyEntries, psyExtract, psyGet, psyGetAll, psyInsert, psyInsertAll, psyKeys, psyKnown, psyPostChop, psyPreChop, psyPrepend, psyPrependAll, psyPut, psyPutInterval, psyReplicate, psyReverse, psyValues, toSyntaxString, toSyntaxStringHelper
Methods inherited from interface coneforest.psylla.core.PsyIterable
psyToArray, psyUnite
Methods inherited from interface coneforest.psylla.core.PsyLengthy
isEmpty, psyIsEmpty, psyLength
Methods inherited from interface coneforest.psylla.core.PsyObject
convert, execute, invoke, psyEq, psyHashCode, psyInstanceOf, psyNe, psySyntax, psyToName, psyToString, psyType, typeName
Methods inherited from interface coneforest.psylla.core.PsyStreamable
psyForAll
-
Field Details
-
OPERATORS
-
-
Constructor Details
-
PsyArray
public PsyArray()Creates a new emptyarray
. -
PsyArray
Creates a newarray
wrapped around the given array list.- Parameters:
array
- a given array list.
-
-
Method Details
-
length
public int length()Description copied from interface:PsyLengthy
Returns a length of this object.- Specified by:
length
in interfacePsyLengthy
- Returns:
- a length.
-
iterator
-
psyClone
Description copied from interface:PsyObject
Returns a clone of this object.- Specified by:
psyClone
in interfacePsyFormalArray<PsyObject>
- Specified by:
psyClone
in interfacePsyObject
- Returns:
- a clone of this object.
-
get
- Specified by:
get
in interfacePsyFormalArray<PsyObject>
- Throws:
PsyRangeCheckException
-
psyGetInterval
- Specified by:
psyGetInterval
in interfacePsyFormalArray<PsyObject>
- Throws:
PsyRangeCheckException
-
psyAppend
Description copied from interface:PsyAppendable
Appends a givenobject
to this container.- Specified by:
psyAppend
in interfacePsyAppendable<PsyObject>
- Parameters:
o
- anobject
to append.- Throws:
PsyLimitCheckException
-
insert
Description copied from interface:PsyFormalArray
Inserts the specifiedobject
into this array at the position specified by a given index.- Specified by:
insert
in interfacePsyFormalArray<PsyObject>
- Parameters:
indexValue
- ainteger
index.o
- aobject
.- Throws:
PsyRangeCheckException
-
put
- Specified by:
put
in interfacePsyFormalArray<PsyObject>
- Throws:
PsyRangeCheckException
-
delete
- Specified by:
delete
in interfacePsyFormalArray<PsyObject>
- Throws:
PsyRangeCheckException
-
extract
- Specified by:
extract
in interfacePsyFormalArray<PsyObject>
- Throws:
PsyRangeCheckException
-
psyExtractInterval
public PsyArray psyExtractInterval(PsyInteger oStart, PsyInteger oCount) throws PsyRangeCheckException - Specified by:
psyExtractInterval
in interfacePsyFormalArray<PsyObject>
- Throws:
PsyRangeCheckException
-
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 interfacePsyFormalArray<PsyObject>
- Specified by:
psySlice
in interfacePsyIndexed<PsyInteger,
PsyObject> - Parameters:
oIndices
- an enumeration of keys.- Returns:
- a container.
- Throws:
PsyErrorException
- when key is absent or index is out of range.
-
psyClear
public void psyClear()Description copied from interface:PsyClearable
Clear this object.- Specified by:
psyClear
in interfacePsyClearable
-
psySetLength
- Specified by:
psySetLength
in interfacePsyFormalArray<PsyObject>
- Throws:
PsyRangeCheckException
PsyLimitCheckException
-
psySort
-
psyBinarySearch
-
psyStream
- Specified by:
psyStream
in interfacePsyIterable<PsyObject>
- Specified by:
psyStream
in interfacePsyStreamable<PsyObject>
-