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 ContextActionContext action of thebitsetoperator.Fields inherited from interface coneforest.psylla.core.PsyAppendable
PSY_APPEND, PSY_APPENDALL, PSY_REPLICATEFields inherited from interface coneforest.psylla.core.PsyClearable
PSY_CLEARFields inherited from interface coneforest.psylla.core.PsyFormalSet
PSY_CONTAINS, PSY_INTERSECTS, PSY_REMOVE, PSY_REMOVEALL, PSY_RETAINALLFields 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_TOSTRING, PSY_TOSTRINGBUFFER, 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 TypeMethodDescriptionbooleaninthashCode()iterator()intlength()Returns a length of this object.voidpsyAppend(PsyInteger oIndex) Appends a givenobjectto this container.voidpsyAppendAll(PsyIterable<? extends PsyInteger> oIterable) Appends all theobjects from a giveniterableenumeration to this set.voidpsyClear()Removes all the elements from this set.psyClone()Returns a clone of this object.psyContains(PsyObject oElement) Returns abooleanobject indicating whether a givenobjectbelongs to this set.psyIntersects(PsyFormalSet<? extends PsyInteger> oSet) Returns abooleanobject indicating whether a givenformalsetset intersects with this set.voidpsyRemove(PsyInteger oIndex) Removes anobjectfrom this set.voidpsyRemoveAll(PsyIterable<? extends PsyInteger> oIterable) Removes all theobjects in a giveniterableenumeration from this set.Returns the syntactic representation of this object.Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliteratorMethods inherited from interface coneforest.psylla.core.PsyContainer
psyNewEmptyMethods inherited from interface coneforest.psylla.core.PsyFormalSet
psyReplicate, psyRetainAll, toSyntaxStringHelperMethods inherited from interface coneforest.psylla.core.PsyIterable
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, psyToString, psyToStringBuffer, psyType, typeNameMethods inherited from interface coneforest.psylla.core.PsyStreamable
psyForAll
-
Field Details
-
PSY_BITSET
Context action of thebitsetoperator.
-
-
Constructor Details
-
PsyBitSet
public PsyBitSet()Instantiate an emptybitsetobject. -
PsyBitSet
Instantiate abitsetobject from a givenBitSetobject.- Parameters:
bitset- a bit set.
-
-
Method Details
-
psyClone
Description copied from interface:PsyObjectReturns a clone of this object.- Specified by:
psyClonein interfacePsyFormalSet<PsyInteger>- Specified by:
psyClonein interfacePsyObject- Returns:
- a clone of this object
-
toSyntaxString
Description copied from interface:PsyObjectReturns the syntactic representation of this object.- Specified by:
toSyntaxStringin interfacePsyFormalSet<PsyInteger>- Specified by:
toSyntaxStringin interfacePsyObject- Returns:
- the syntactic representation of this object
-
psyAppend
Description copied from interface:PsyAppendableAppends a givenobjectto this container.- Specified by:
psyAppendin interfacePsyAppendable<PsyInteger>- Parameters:
oIndex- anobjectto append.- Throws:
PsyLimitCheckException- when TODO.PsyRangeCheckException- when TODO.
-
psyAppendAll
public void psyAppendAll(PsyIterable<? extends PsyInteger> oIterable) throws PsyLimitCheckException, PsyRangeCheckException Description copied from interface:PsyFormalSetAppends all theobjects from a giveniterableenumeration 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:
psyAppendAllin interfacePsyAppendable<PsyInteger>- Specified by:
psyAppendAllin interfacePsyFormalSet<PsyInteger>- Parameters:
oIterable- aniterableenumeration.- Throws:
PsyLimitCheckException- when TODO.PsyRangeCheckException- when TODO.
-
psyRemove
Description copied from interface:PsyFormalSetRemoves anobjectfrom this set. If a given object is not present in this set, error does not occur.- Specified by:
psyRemovein interfacePsyFormalSet<PsyInteger>- Parameters:
oIndex- anobject.
-
psyRemoveAll
Description copied from interface:PsyFormalSetRemoves all theobjects in a giveniterableenumeration from this set. If some object is not present in this set, error does not occur.- Specified by:
psyRemoveAllin interfacePsyFormalSet<PsyInteger>- Parameters:
oIterable- aniterableenumeration.
-
iterator
- Specified by:
iteratorin interfaceIterable<PsyInteger>
-
psyClear
public void psyClear()Description copied from interface:PsyFormalSetRemoves all the elements from this set.- Specified by:
psyClearin interfacePsyClearable- Specified by:
psyClearin interfacePsyFormalSet<PsyInteger>
-
length
public int length()Description copied from interface:PsyLengthyReturns a length of this object.- Specified by:
lengthin interfacePsyLengthy- Returns:
- a length of this object
-
psyContains
Description copied from interface:PsyFormalSetReturns abooleanobject indicating whether a givenobjectbelongs to this set.- Specified by:
psyContainsin interfacePsyFormalSet<PsyInteger>- Parameters:
oElement- anobject.- Returns:
- a
booleanobject indicating whether a givenobjectbelongs to this set
-
psyIntersects
Description copied from interface:PsyFormalSetReturns abooleanobject indicating whether a givenformalsetset intersects with this set.- Specified by:
psyIntersectsin interfacePsyFormalSet<PsyInteger>- Parameters:
oSet- aformalsetset.- Returns:
- a
booleanobject indicating whether a givenformalsetset intersects with this set
-
psyStream
- Specified by:
psyStreamin interfacePsyIterable<PsyInteger>- Specified by:
psyStreamin interfacePsyStreamable<PsyInteger>
-
hashCode
public int hashCode() -
equals
- Specified by:
equalsin interfacePsyFormalSet<PsyInteger>- Overrides:
equalsin classObject
-