Package coneforest.psylla.core
Class PsyBitArray
java.lang.Object
coneforest.psylla.core.PsyBitArray
- All Implemented Interfaces:
PsyAppendable<PsyBoolean>
,PsyBitwise<PsyBitArray>
,PsyClearable
,PsyContainer<PsyBoolean>
,PsyConvertableToName
,PsyConvertableToString
,PsyFormalArray<PsyBoolean>
,PsyIndexed<PsyInteger,
,PsyBoolean> PsyIterable<PsyBoolean>
,PsyLengthy
,PsyLogical<PsyBitArray>
,PsyObject
,PsySequential<PsyBoolean>
,PsyStreamable<PsyBoolean>
,Iterable<PsyBoolean>
public class PsyBitArray
extends Object
implements PsyFormalArray<PsyBoolean>, PsyBitwise<PsyBitArray>
A representation of
bitarray
object.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
delete
(int index) extract
(int indexValue) get
(int index) void
insert
(int index, PsyBoolean oBoolean) Inserts the specifiedobject
into this array at the position specified by a given index.iterator()
int
length()
Returns a length of this object.psyAnd
(PsyBitArray oBitArray) Returns a result of logical conjunction of this object and given object.void
psyAppend
(PsyBoolean oBoolean) Appends a givenobject
to this container.psyBitShift
(PsyInteger oShift) void
psyClear()
Clear this object.psyClearBit
(PsyInteger oBit) psyClone()
Returns a clone of this object.psyExtractInterval
(PsyInteger oStart, PsyInteger oCount) psyFlipBit
(PsyInteger oBit) psyGetInterval
(PsyInteger oIndex, PsyInteger oCount) psyNot()
Returns a result of logical negation of this object.psyOr
(PsyBitArray oBitArray) Returns a result of logical disjunction of this object and given object.void
psyPutInterval
(PsyInteger oIndex, PsyIterable<? extends PsyBoolean> oIterable) psySetBit
(PsyInteger oBit) 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.psyTestBit
(PsyInteger oBit) psyXor
(PsyBitArray oBitArray) Returns a result of logical exclusive disjunction of this object and given object.void
put
(int index, PsyBoolean oBoolean) 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, psyReplicate, psyReverse, psyValues, toSyntaxString, toSyntaxStringHelper
Methods inherited from interface coneforest.psylla.core.PsyIterable
psyStream, 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
-
PsyBitArray
public PsyBitArray()Creates a new emptybitarray
. -
PsyBitArray
-
-
Method Details
-
get
- Specified by:
get
in interfacePsyFormalArray<PsyBoolean>
- Throws:
PsyErrorException
-
psyGetInterval
- Specified by:
psyGetInterval
in interfacePsyFormalArray<PsyBoolean>
- Throws:
PsyErrorException
-
put
- Specified by:
put
in interfacePsyFormalArray<PsyBoolean>
- Throws:
PsyErrorException
-
psyPutInterval
public void psyPutInterval(PsyInteger oIndex, PsyIterable<? extends PsyBoolean> oIterable) throws PsyErrorException - Specified by:
psyPutInterval
in interfacePsyFormalArray<PsyBoolean>
- Throws:
PsyErrorException
-
psyAppend
Description copied from interface:PsyAppendable
Appends a givenobject
to this container.- Specified by:
psyAppend
in interfacePsyAppendable<PsyBoolean>
- Parameters:
oBoolean
- anobject
to append.
-
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<PsyBoolean>
- Parameters:
index
- ainteger
index.oBoolean
- aobject
.
-
delete
- Specified by:
delete
in interfacePsyFormalArray<PsyBoolean>
- Throws:
PsyErrorException
-
extract
- Specified by:
extract
in interfacePsyFormalArray<PsyBoolean>
- Throws:
PsyErrorException
-
psyExtractInterval
public PsyBitArray psyExtractInterval(PsyInteger oStart, PsyInteger oCount) throws PsyErrorException - Specified by:
psyExtractInterval
in interfacePsyFormalArray<PsyBoolean>
- Throws:
PsyErrorException
-
psyNot
Description copied from interface:PsyLogical
Returns a result of logical negation of this object.- Specified by:
psyNot
in interfacePsyLogical<PsyBitArray>
- Returns:
- a result.
-
psyOr
Description copied from interface:PsyLogical
Returns a result of logical disjunction of this object and given object.- Specified by:
psyOr
in interfacePsyLogical<PsyBitArray>
- Parameters:
oBitArray
- given object.- Returns:
- a result.
-
psyAnd
Description copied from interface:PsyLogical
Returns a result of logical conjunction of this object and given object.- Specified by:
psyAnd
in interfacePsyLogical<PsyBitArray>
- Parameters:
oBitArray
- given object.- Returns:
- a result.
-
psyXor
Description copied from interface:PsyLogical
Returns a result of logical exclusive disjunction of this object and given object.- Specified by:
psyXor
in interfacePsyLogical<PsyBitArray>
- Parameters:
oBitArray
- given object.- Returns:
- a result.
-
psyBitShift
- Specified by:
psyBitShift
in interfacePsyBitwise<PsyBitArray>
-
psyTestBit
- Specified by:
psyTestBit
in interfacePsyBitwise<PsyBitArray>
- Throws:
PsyRangeCheckException
-
psySetBit
- Specified by:
psySetBit
in interfacePsyBitwise<PsyBitArray>
- Throws:
PsyRangeCheckException
-
psyFlipBit
- Specified by:
psyFlipBit
in interfacePsyBitwise<PsyBitArray>
- Throws:
PsyRangeCheckException
-
psyClearBit
- Specified by:
psyClearBit
in interfacePsyBitwise<PsyBitArray>
- Throws:
PsyRangeCheckException
-
iterator
- Specified by:
iterator
in interfaceIterable<PsyBoolean>
-
length
public int length()Description copied from interface:PsyLengthy
Returns a length of this object.- Specified by:
length
in interfacePsyLengthy
- Returns:
- a length.
-
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<PsyBoolean>
- Specified by:
psySlice
in interfacePsyIndexed<PsyInteger,
PsyBoolean> - Parameters:
oIndices
- an enumeration of keys.- Returns:
- a container.
- Throws:
PsyErrorException
- when key is absent or index is out of range.
-
psySetLength
- Specified by:
psySetLength
in interfacePsyFormalArray<PsyBoolean>
- Throws:
PsyErrorException
-
psyClone
Description copied from interface:PsyObject
Returns a clone of this object.- Specified by:
psyClone
in interfacePsyFormalArray<PsyBoolean>
- Specified by:
psyClone
in interfacePsyObject
- Returns:
- a clone of this object.
-
psyClear
public void psyClear()Description copied from interface:PsyClearable
Clear this object.- Specified by:
psyClear
in interfacePsyClearable
-