Package coneforest.psylla.core
Interface PsySetlike<T extends PsyObject>
-
- Type Parameters:
T
- a type of the elements.
- All Superinterfaces:
Iterable<T>
,PsyAppendable<T>
,PsyClearable
,PsyContainer<T>
,PsyConvertableToName
,PsyConvertableToString
,PsyIterable<T>
,PsyLengthy
,PsyObject
,PsyStreamlike<T>
public interface PsySetlike<T extends PsyObject> extends PsyAppendable<T>, PsyContainer<T>
A representation of a Ψ-setlike
, an abstraction of a finite set of Ψ-object
s. This interface declares methods for appending, removal and set operations.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default void
psyAppendAll(PsyIterable<? extends T> oEnumeration)
Appends all the Ψ-object
s from a given Ψ-iterable
enumeration to this set.default void
psyClear()
Removes all the elements from this set.PsyBoolean
psyContains(T o)
Returns a Ψ-boolean
object indicating whether a given Ψ-object
belongs to this set.default PsyBoolean
psyIntersects(PsySetlike<? extends T> oSet)
Returns a Ψ-boolean
object indicating whether a given Ψ-setlike
set intersects with this set.void
psyRemove(T o)
Removes a Ψ-object
from this set.default void
psyRemoveAll(PsyIterable<? extends T> oEnumeration)
Removes all the Ψ-object
s in a given Ψ-iterable
enumeration from this set.default PsySetlike<T>
psyReplicate(PsyInteger oCount)
default void
psyRetainAll(PsyIterable<? extends T> oEnumeration)
default String
toSyntaxString()
default String
toSyntaxStringHelper(PsyLengthy oLengthy)
-
Methods inherited from interface java.lang.Iterable
forEach, iterator, spliterator
-
Methods inherited from interface coneforest.psylla.core.PsyAppendable
psyAppend
-
Methods inherited from interface coneforest.psylla.core.PsyContainer
psyNewEmpty
-
Methods inherited from interface coneforest.psylla.core.PsyIterable
psyCount, psyFilter, psyForAll, psyMap, psyStream, psyToArray, psyUnite
-
Methods inherited from interface coneforest.psylla.core.PsyLengthy
isEmpty, length, psyIsEmpty, psyLength
-
Methods inherited from interface coneforest.psylla.core.PsyObject
convert, execute, invoke, psyClone, psyEq, psyHashCode, psyInstanceOf, psyNe, psySyntax, psyToName, psyToString, psyType, typeName
-
Methods inherited from interface coneforest.psylla.core.PsyStreamlike
iterator, psyConcat
-
-
-
-
Method Detail
-
psyRemove
void psyRemove(T o)
Removes a Ψ-object
from this set. If a given object is not present in this set, error does not occur.- Parameters:
o
- a given Ψ-object
.
-
psyRemoveAll
default void psyRemoveAll(PsyIterable<? extends T> oEnumeration)
Removes all the Ψ-object
s in a given Ψ-iterable
enumeration from this set. If some object is not present in this set, error does not occur.- Parameters:
oEnumeration
- a given Ψ-iterable
enumeration.
-
psyRetainAll
default void psyRetainAll(PsyIterable<? extends T> oEnumeration) throws PsyException
- Throws:
PsyException
-
psyContains
PsyBoolean psyContains(T o)
Returns a Ψ-boolean
object indicating whether a given Ψ-object
belongs to this set.- Parameters:
o
- a given Ψ-object
.- Returns:
PsyBoolean.TRUE
, if an object belongs to this set, andPsyBoolean.FALSE
otherwise.
-
psyClear
default void psyClear()
Removes all the elements from this set.- Specified by:
psyClear
in interfacePsyClearable
-
psyAppendAll
default void psyAppendAll(PsyIterable<? extends T> oEnumeration) throws PsyException
Appends all the Ψ-object
s from a given Ψ-iterable
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<T extends PsyObject>
- Parameters:
oEnumeration
- a Ψ-iterable
enumeration.- Throws:
PsyException
- when an error occurs.
-
psyIntersects
default PsyBoolean psyIntersects(PsySetlike<? extends T> oSet)
Returns a Ψ-boolean
object indicating whether a given Ψ-setlike
set intersects with this set.- Parameters:
oSet
- a given Ψ-setlike
set.- Returns:
PsyBoolean.TRUE
, if a given Ψ-setlike
set intersects with this set, andPsyBoolean.FALSE
otherwise.
-
psyReplicate
default PsySetlike<T> psyReplicate(PsyInteger oCount) throws PsyException
- Specified by:
psyReplicate
in interfacePsyAppendable<T extends PsyObject>
- Throws:
PsyException
-
toSyntaxString
default String toSyntaxString()
- Specified by:
toSyntaxString
in interfacePsyObject
-
toSyntaxStringHelper
default String toSyntaxStringHelper(PsyLengthy oLengthy)
-
-