Package coneforest.psylla.core
Class PsySet
java.lang.Object
coneforest.psylla.core.PsySet
- All Implemented Interfaces:
PsyAppendable<PsyObject>
,PsyClearable
,PsyContainer<PsyObject>
,PsyConvertableToName
,PsyConvertableToString
,PsyFormalSet<PsyObject>
,PsyIterable<PsyObject>
,PsyLengthy
,PsyObject
,PsySequential<PsyObject>
,PsyStreamable<PsyObject>
,Iterable<PsyObject>
A representation of
set
object.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioniterator()
int
length()
Returns a length of this object.void
Appends a givenobject
to this container.void
psyClear()
Removes all the elements from this set.psyClone()
Returns a clone of this object.Returns aboolean
object indicating whether a givenobject
belongs to this set.void
Removes anobject
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
psyAppendAll, psyIntersects, psyRemoveAll, psyReplicate, psyRetainAll, 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
-
PsySet
public PsySet()Creates a new emptyset
object. -
PsySet
Creates a newset
object wrapped around the given hash set.- Parameters:
set
- a given hash set.
-
-
Method Details
-
psyClone
Description copied from interface:PsyObject
Returns a clone of this object. -
length
public int length()Description copied from interface:PsyLengthy
Returns a length of this object.- Specified by:
length
in interfacePsyLengthy
- Returns:
- a length.
-
psyAppend
Description copied from interface:PsyAppendable
Appends a givenobject
to this container.- Specified by:
psyAppend
in interfacePsyAppendable<PsyObject>
- Parameters:
o
- anobject
to append.
-
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<PsyObject>
- Parameters:
o
- anobject
.
-
psyContains
Description copied from interface:PsyFormalSet
Returns aboolean
object indicating whether a givenobject
belongs to this set.- Specified by:
psyContains
in interfacePsyFormalSet<PsyObject>
- Parameters:
o
- anobject
.- Returns:
PsyBoolean.TRUE
, if an object belongs to this set, andPsyBoolean.FALSE
otherwise.
-
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<PsyObject>
-
iterator
-
psyStream
- Specified by:
psyStream
in interfacePsyIterable<PsyObject>
- Specified by:
psyStream
in interfacePsyStreamable<PsyObject>
-