java.lang.Object
coneforest.psylla.core.PsyBitSet
- All Implemented Interfaces:
PsyAppendable<PsyInteger>
,PsyClearable
,PsyContainer<PsyInteger>
,PsyFormalSet<PsyInteger>
,PsyIterable<PsyInteger>
,PsyLengthy
,PsyObject
,PsySequential<PsyInteger>
,PsyStreamable<PsyInteger>
,Iterable<PsyInteger>
The representation of
bitset
, a set of nonnegative integer
objects.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ContextAction
Context action of thebitset
operator.Fields inherited from interface coneforest.psylla.core.PsyAppendable
PSY_APPEND, PSY_APPENDALL
Fields inherited from interface coneforest.psylla.core.PsyClearable
PSY_CLEAR
Fields inherited from interface coneforest.psylla.core.PsyFormalSet
PSY_CONTAINS, PSY_INTERSECTS, PSY_REMOVE, PSY_REMOVEALL, PSY_RETAINALL
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_TONAME, PSY_TOSTRING, PSY_TYPE
Fields inherited from interface coneforest.psylla.core.PsySequential
PSY_FORALL
Fields inherited from interface coneforest.psylla.core.PsyStreamable
PSY_STREAM
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioniterator()
int
length()
Returns a length of this object.void
psyAppend
(PsyInteger oIndex) Appends a givenobject
to this container.void
psyAppendAll
(PsyIterable<? extends PsyInteger> oIterable) Appends all theobject
s from a giveniterable
enumeration to this set.void
psyClear()
Removes all the elements from this set.psyClone()
Returns a clone of this object.psyContains
(PsyInteger oElement) Returns aboolean
object indicating whether a givenobject
belongs to this set.psyIntersects
(PsyFormalSet oSet) Returns aboolean
object indicating whether a givenformalset
set intersects with this set.void
psyRemove
(PsyInteger oIndex) Removes anobject
from this set.void
psyRemoveAll
(PsyIterable<? extends PsyInteger> oIterable) Removes all theobject
s in a giveniterable
enumeration from this set.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.PsyContainer
psyNewEmpty, toSyntaxStringHelper
Methods inherited from interface coneforest.psylla.core.PsyFormalSet
psyReplicate, psyRetainAll, 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, psyHashCode, psyInstanceOf, psyNe, psySyntax, psyToName, psyToString, psyType, typeName
Methods inherited from interface coneforest.psylla.core.PsyStreamable
psyForAll
-
Field Details
-
PSY_BITSET
Context action of thebitset
operator.
-
-
Constructor Details
-
PsyBitSet
public PsyBitSet()Instantiate an emptybitset
object. -
PsyBitSet
Instantiate abitset
object from a givenBitSet
object.- Parameters:
bitset
- a bit set.
-
-
Method Details
-
psyClone
Description copied from interface:PsyObject
Returns a clone of this object. -
toSyntaxString
- Specified by:
toSyntaxString
in interfacePsyFormalSet<PsyInteger>
- Specified by:
toSyntaxString
in interfacePsyObject
-
getBitSet
-
psyAppend
Description copied from interface:PsyAppendable
Appends a givenobject
to this container.- Specified by:
psyAppend
in interfacePsyAppendable<PsyInteger>
- Parameters:
oIndex
- anobject
to append.- Throws:
PsyLimitCheckException
- when TODO.PsyRangeCheckException
- when TODO.
-
psyAppendAll
public void psyAppendAll(PsyIterable<? extends PsyInteger> oIterable) throws PsyLimitCheckException, PsyRangeCheckException Description copied from interface:PsyFormalSet
Appends all theobject
s from a giveniterable
enumeration to this set. When a given enumeration is the same as this set, first clone the enumeration, and then appends all the elements from the clone.- Specified by:
psyAppendAll
in interfacePsyAppendable<PsyInteger>
- Specified by:
psyAppendAll
in interfacePsyFormalSet<PsyInteger>
- Parameters:
oIterable
- aniterable
enumeration.- Throws:
PsyLimitCheckException
- when TODO.PsyRangeCheckException
- when TODO.
-
psyRemove
Description copied from interface:PsyFormalSet
Removes anobject
from this set. If a given object is not present in this set, error does not occur.- Specified by:
psyRemove
in interfacePsyFormalSet<PsyInteger>
- Parameters:
oIndex
- anobject
.
-
psyRemoveAll
Description copied from interface:PsyFormalSet
Removes all theobject
s in a giveniterable
enumeration from this set. If some object is not present in this set, error does not occur.- Specified by:
psyRemoveAll
in interfacePsyFormalSet<PsyInteger>
- Parameters:
oIterable
- aniterable
enumeration.
-
iterator
- Specified by:
iterator
in interfaceIterable<PsyInteger>
-
psyClear
public void psyClear()Description copied from interface:PsyFormalSet
Removes all the elements from this set.- Specified by:
psyClear
in interfacePsyClearable
- Specified by:
psyClear
in interfacePsyFormalSet<PsyInteger>
-
length
public int length()Description copied from interface:PsyLengthy
Returns a length of this object.- Specified by:
length
in interfacePsyLengthy
- Returns:
- a length.
-
psyContains
Description copied from interface:PsyFormalSet
Returns aboolean
object indicating whether a givenobject
belongs to this set.- Specified by:
psyContains
in interfacePsyFormalSet<PsyInteger>
- Parameters:
oElement
- anobject
.- Returns:
boolean
indicating whether an object belongs to this set.
-
psyIntersects
Description copied from interface:PsyFormalSet
Returns aboolean
object indicating whether a givenformalset
set intersects with this set.- Specified by:
psyIntersects
in interfacePsyFormalSet<PsyInteger>
- Parameters:
oSet
- aformalset
set.- Returns:
boolean
indicating whether a givenformalset
intersects with this set.
-
psyEq
-
psyStream
- Specified by:
psyStream
in interfacePsyIterable<PsyInteger>
- Specified by:
psyStream
in interfacePsyStreamable<PsyInteger>
-