Package coneforest.psylla.core
Interface PsyFormalSet<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,PsySequential<T>,PsyStreamable<T>
public interface PsyFormalSet<T extends PsyObject> extends PsyAppendable<T>, PsyContainer<T>
A representation of a Ψ-formalset, an abstraction of a finite set of Ψ-objects. This interface declares methods for appending, removal and set operations.
-
-
Field Summary
Fields Modifier and Type Field Description static PsyOperator[]OPERATORS
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default voidpsyAppendAll(PsyIterable<? extends T> oEnumeration)Appends all the Ψ-objects from a given Ψ-iterableenumeration to this set.default voidpsyClear()Removes all the elements from this set.PsyBooleanpsyContains(T o)Returns a Ψ-booleanobject indicating whether a given Ψ-objectbelongs to this set.default PsyBooleanpsyIntersects(PsyFormalSet<? extends T> oSet)Returns a Ψ-booleanobject indicating whether a given Ψ-formalsetset intersects with this set.voidpsyRemove(T o)Removes a Ψ-objectfrom this set.default voidpsyRemoveAll(PsyIterable<? extends T> oEnumeration)Removes all the Ψ-objects in a given Ψ-iterableenumeration from this set.default PsyFormalSet<T>psyReplicate(PsyInteger oCount)default voidpsyRetainAll(PsyIterable<? extends T> oEnumeration)default StringtoSyntaxString()default StringtoSyntaxStringHelper(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, toSyntaxStringHelper
-
Methods inherited from interface coneforest.psylla.core.PsyIterable
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.PsyStreamable
psyForAll
-
-
-
-
Field Detail
-
OPERATORS
static final PsyOperator[] OPERATORS
-
-
Method Detail
-
psyRemove
void psyRemove(T o)
Removes a Ψ-objectfrom 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 Ψ-objects in a given Ψ-iterableenumeration from this set. If some object is not present in this set, error does not occur.- Parameters:
oEnumeration- a given Ψ-iterableenumeration.
-
psyRetainAll
default void psyRetainAll(PsyIterable<? extends T> oEnumeration) throws PsyException
- Throws:
PsyException
-
psyContains
PsyBoolean psyContains(T o)
Returns a Ψ-booleanobject indicating whether a given Ψ-objectbelongs to this set.- Parameters:
o- a given Ψ-object.- Returns:
PsyBoolean.TRUE, if an object belongs to this set, andPsyBoolean.FALSEotherwise.
-
psyClear
default void psyClear()
Removes all the elements from this set.- Specified by:
psyClearin interfacePsyClearable
-
psyAppendAll
default void psyAppendAll(PsyIterable<? extends T> oEnumeration) throws PsyException
Appends all the Ψ-objects from a given Ψ-iterableenumeration 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<T extends PsyObject>- Parameters:
oEnumeration- a Ψ-iterableenumeration.- Throws:
PsyException- when an error occurs.
-
psyIntersects
default PsyBoolean psyIntersects(PsyFormalSet<? extends T> oSet)
Returns a Ψ-booleanobject indicating whether a given Ψ-formalsetset intersects with this set.- Parameters:
oSet- a given Ψ-formalsetset.- Returns:
PsyBoolean.TRUE, if a given Ψ-formalsetset intersects with this set, andPsyBoolean.FALSEotherwise.
-
psyReplicate
default PsyFormalSet<T> psyReplicate(PsyInteger oCount) throws PsyException
- Specified by:
psyReplicatein interfacePsyAppendable<T extends PsyObject>- Throws:
PsyException
-
toSyntaxString
default String toSyntaxString()
- Specified by:
toSyntaxStringin interfacePsyObject
-
toSyntaxStringHelper
default String toSyntaxStringHelper(PsyLengthy oLengthy)
-
-