java.lang.Object
coneforest.psylla.core.PsyBitArray
- All Implemented Interfaces:
PsyAppendable<PsyBoolean>,PsyBitwise<PsyBitArray>,PsyClearable,PsyContainer<PsyBoolean>,PsyFormalArray<PsyBoolean>,PsyIndexed<PsyInteger,,PsyBoolean> PsyIterable<PsyBoolean>,PsyLengthy,PsyLogical<PsyBitArray>,PsyObject,PsySequential<PsyBoolean>,PsyStreamable<PsyBoolean>,Iterable<PsyBoolean>
@Type("bitarray")
public class PsyBitArray
extends Object
implements PsyFormalArray<PsyBoolean>, PsyBitwise<PsyBitArray>
The representation of
bitarray.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ContextActionContext action of thebitarrayoperator.Fields inherited from interface coneforest.psylla.core.PsyAppendable
PSY_APPEND, PSY_APPENDALLFields inherited from interface coneforest.psylla.core.PsyBitwise
PSY_BITSHIFT, PSY_CLEARBIT, PSY_FLIPBIT, PSY_SETBIT, PSY_TESTBITFields inherited from interface coneforest.psylla.core.PsyClearable
PSY_CLEARFields inherited from interface coneforest.psylla.core.PsyFormalArray
PSY_EXTRACTINTERVAL, PSY_GETINTERVAL, PSY_INSERT, PSY_INSERTALL, PSY_POSTCHOP, PSY_PRECHOP, PSY_PREPEND, PSY_PREPENDALL, PSY_PUTINTERVAL, PSY_REVERSE, PSY_SETLENGTHFields 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.PsyLogical
PSY_AND, PSY_NOT, PSY_OR, PSY_XORFields 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 -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddelete(int index) Removes the element at the specified position in this array.extract(int indexValue) get(int index) Returns the element at the specified position in this array.voidinsert(int index, PsyBoolean oBoolean) Inserts the specifiedobjectinto this array at the position specified by a given index.iterator()intlength()Returns a length of this object.psyAnd(PsyBitArray oBitArray) Returns a result of logical conjunction of this object and given object.voidpsyAppend(PsyBoolean oBoolean) Appends a givenobjectto this container.psyBitShift(PsyInteger oShift) Returns abitwisewhose value is equivalent to this value with bits shifted at the given distance.voidpsyClear()Clear this object.psyClearBit(PsyInteger oBit) Returns abitwisewhose value is equivalent to this value with the designated bit cleared.psyClone()Returns a clone of this object.psyExtractInterval(PsyInteger oStart, PsyInteger oCount) psyFlipBit(PsyInteger oBit) Returns abitwisewhose value is equivalent to this value with the designated bit flipped.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.voidpsyPutInterval(PsyInteger oIndex, PsyIterable<? extends PsyBoolean> oIterable) psySetBit(PsyInteger oBit) Returns abitwisewhose value is equivalent to this value with the designated bit set.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.psyTestBit(PsyInteger oBit) Returns abooleanindicating if the designated bit is set.psyXor(PsyBitArray oBitArray) Returns a result of logical exclusive disjunction of this object and given object.voidput(int index, PsyBoolean oBoolean) Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliteratorMethods inherited from interface coneforest.psylla.core.PsyAppendable
psyAppendAllMethods inherited from interface coneforest.psylla.core.PsyContainer
psyNewEmptyMethods inherited from interface coneforest.psylla.core.PsyFormalArray
psyDelete, psyEntries, psyExtract, psyGet, psyInsert, psyInsertAll, psyKeys, psyKnown, psyPostChop, psyPreChop, psyPrepend, psyPrependAll, psyPut, psyReplicate, psyReverse, psyValues, toSyntaxString, toSyntaxStringHelperMethods 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, 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_BITARRAY
Context action of thebitarrayoperator.
-
-
Constructor Details
-
PsyBitArray
public PsyBitArray()Creates a new emptybitarray. -
PsyBitArray
-
-
Method Details
-
get
Description copied from interface:PsyFormalArrayReturns the element at the specified position in this array.- Specified by:
getin interfacePsyFormalArray<PsyBoolean>- 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.
-
psyGetInterval
public PsyBitArray psyGetInterval(PsyInteger oIndex, PsyInteger oCount) throws PsyRangeCheckException - Specified by:
psyGetIntervalin interfacePsyFormalArray<PsyBoolean>- Throws:
PsyRangeCheckException
-
put
- Specified by:
putin interfacePsyFormalArray<PsyBoolean>- Throws:
PsyRangeCheckException
-
psyPutInterval
public void psyPutInterval(PsyInteger oIndex, PsyIterable<? extends PsyBoolean> oIterable) throws PsyRangeCheckException - Specified by:
psyPutIntervalin interfacePsyFormalArray<PsyBoolean>- Throws:
PsyRangeCheckException
-
psyAppend
Description copied from interface:PsyAppendableAppends a givenobjectto this container.- Specified by:
psyAppendin interfacePsyAppendable<PsyBoolean>- Parameters:
oBoolean- anobjectto append.
-
insert
Description copied from interface:PsyFormalArrayInserts the specifiedobjectinto this array at the position specified by a given index.- Specified by:
insertin interfacePsyFormalArray<PsyBoolean>- Parameters:
index- aintegerindex.oBoolean- aobject.
-
delete
Description copied from interface:PsyFormalArrayRemoves the element at the specified position in this array.- Specified by:
deletein interfacePsyFormalArray<PsyBoolean>- Parameters:
index- the index of the element to be removed.- Throws:
PsyRangeCheckException- if the index is out of range.
-
extract
- Specified by:
extractin interfacePsyFormalArray<PsyBoolean>- Throws:
PsyRangeCheckException
-
psyExtractInterval
public PsyBitArray psyExtractInterval(PsyInteger oStart, PsyInteger oCount) throws PsyRangeCheckException - Specified by:
psyExtractIntervalin interfacePsyFormalArray<PsyBoolean>- Throws:
PsyRangeCheckException
-
psyNot
Description copied from interface:PsyLogicalReturns a result of logical negation of this object.- Specified by:
psyNotin interfacePsyLogical<PsyBitArray>- Returns:
- a result.
-
psyOr
Description copied from interface:PsyLogicalReturns a result of logical disjunction of this object and given object.- Specified by:
psyOrin interfacePsyLogical<PsyBitArray>- Parameters:
oBitArray- given object.- Returns:
- a result.
-
psyAnd
Description copied from interface:PsyLogicalReturns a result of logical conjunction of this object and given object.- Specified by:
psyAndin interfacePsyLogical<PsyBitArray>- Parameters:
oBitArray- given object.- Returns:
- a result.
-
psyXor
Description copied from interface:PsyLogicalReturns a result of logical exclusive disjunction of this object and given object.- Specified by:
psyXorin interfacePsyLogical<PsyBitArray>- Parameters:
oBitArray- given object.- Returns:
- a result.
-
psyBitShift
Description copied from interface:PsyBitwiseReturns abitwisewhose value is equivalent to this value with bits shifted at the given distance. If the distance is negative, the left shift is preformed. If the distance is positive, the right shift is preformed. If the distance is zero, returns this.- Specified by:
psyBitShiftin interfacePsyBitwise<PsyBitArray>- Parameters:
oShift- the shift distance.- Returns:
- a
bitwisewhose value is equivalent to this value with bits shifted at the given distance.
-
psyTestBit
Description copied from interface:PsyBitwiseReturns abooleanindicating if the designated bit is set.- Specified by:
psyTestBitin interfacePsyBitwise<PsyBitArray>- Parameters:
oBit- the index of bit to test.- Returns:
- a
booleanindicating if the designated bit set. - Throws:
PsyRangeCheckException- if the index is out of range.
-
psySetBit
Description copied from interface:PsyBitwiseReturns abitwisewhose value is equivalent to this value with the designated bit set.- Specified by:
psySetBitin interfacePsyBitwise<PsyBitArray>- Parameters:
oBit- the index of bit to set.- Returns:
- a
bitwisewhose value is equivalent to this value with the designated bit set. - Throws:
PsyRangeCheckException- if the index is out of range.
-
psyFlipBit
Description copied from interface:PsyBitwiseReturns abitwisewhose value is equivalent to this value with the designated bit flipped.- Specified by:
psyFlipBitin interfacePsyBitwise<PsyBitArray>- Parameters:
oBit- the index of bit to flip.- Returns:
- a
bitwisewhose value is equivalent to this value with the designated bit flipped. - Throws:
PsyRangeCheckException- if the index is out of range.
-
psyClearBit
Description copied from interface:PsyBitwiseReturns abitwisewhose value is equivalent to this value with the designated bit cleared.- Specified by:
psyClearBitin interfacePsyBitwise<PsyBitArray>- Parameters:
oBit- the index of bit to clear.- Returns:
- a
bitwisewhose value is equivalent to this value with the designated bit cleared. - Throws:
PsyRangeCheckException- if the index is out of range.
-
iterator
- Specified by:
iteratorin interfaceIterable<PsyBoolean>
-
length
public int length()Description copied from interface:PsyLengthyReturns a length of this object.- Specified by:
lengthin interfacePsyLengthy- Returns:
- a length.
-
psySlice
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 interfacePsyFormalArray<PsyBoolean>- Specified by:
psySlicein interfacePsyIndexed<PsyInteger,PsyBoolean> - Parameters:
oIndices- an enumeration of keys.- Returns:
- a container.
- Throws:
PsyRangeCheckException- when the index is out of range.
-
psySetLength
- Specified by:
psySetLengthin interfacePsyFormalArray<PsyBoolean>- Throws:
PsyLimitCheckExceptionPsyRangeCheckException
-
psyClone
Description copied from interface:PsyObjectReturns a clone of this object.- Specified by:
psyClonein interfacePsyFormalArray<PsyBoolean>- Specified by:
psyClonein interfacePsyObject- Returns:
- a clone of this object.
-
psyClear
public void psyClear()Description copied from interface:PsyClearableClear this object.- Specified by:
psyClearin interfacePsyClearable
-