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>
All Known Implementing Classes:
PsyBitSet, PsySet

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 Details

  • Method Details

    • psyRemove

      void psyRemove(T o)
      Removes an object from this set. If a given object is not present in this set, error does not occur.
      Parameters:
      o - an object.
    • psyRemoveAll

      default void psyRemoveAll(PsyIterable<? extends T> oEnumeration)
      Removes all the objects in a given iterable enumeration from this set. If some object is not present in this set, error does not occur.
      Parameters:
      oEnumeration - an iterable enumeration.
    • psyRetainAll

      default void psyRetainAll(PsyIterable<? extends T> oEnumeration) throws PsyErrorException
      Throws:
      PsyErrorException
    • psyContains

      PsyBoolean psyContains(T o)
      Returns a boolean object indicating whether a given object belongs to this set.
      Parameters:
      o - an object.
      Returns:
      PsyBoolean.TRUE, if an object belongs to this set, and PsyBoolean.FALSE otherwise.
    • psyClear

      default void psyClear()
      Removes all the elements from this set.
      Specified by:
      psyClear in interface PsyClearable
    • psyAppendAll

      default void psyAppendAll(PsyIterable<? extends T> oEnumeration) throws PsyErrorException
      Appends all the objects 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 interface PsyAppendable<T extends PsyObject>
      Parameters:
      oEnumeration - an iterable enumeration.
      Throws:
      PsyErrorException - when an error occurs.
    • psyIntersects

      default PsyBoolean psyIntersects(PsyFormalSet<? extends T> oSet)
      Returns a boolean object indicating whether a given formalset set intersects with this set.
      Parameters:
      oSet - a formalset set.
      Returns:
      PsyBoolean.TRUE, if a given formalset set intersects with this set, and PsyBoolean.FALSE otherwise.
    • psyReplicate

      default PsyFormalSet<T> psyReplicate(PsyInteger oCount) throws PsyErrorException
      Specified by:
      psyReplicate in interface PsyAppendable<T extends PsyObject>
      Throws:
      PsyErrorException
    • toSyntaxString

      default String toSyntaxString()
      Specified by:
      toSyntaxString in interface PsyObject
    • toSyntaxStringHelper

      default String toSyntaxStringHelper(PsyLengthy oLengthy)