Interface FlowSet<T>

    • Method Summary

      All Methods Instance Methods Abstract Methods Default Methods 
      Modifier and Type Method Description
      void add​(T obj)
      Adds obj to this.
      void add​(T obj, FlowSet<T> dest)
      puts this union obj into dest.
      void clear()
      Sets this FlowSet to the empty set (more generally, the bottom element of the lattice.)
      FlowSet<T> clone()
      Clones the current FlowSet.
      boolean contains​(T obj)
      Returns true if this FlowSet contains obj.
      void copy​(FlowSet<T> dest)
      Copies the current FlowSet into dest.
      default void copyFreshToExisting​(FlowSet<T> dest)
      Copies a *fresh* copy of this to dest.
      void difference​(FlowSet<T> other)
      Returns the set difference (this intersect ~other) of this FlowSet and other, putting result into this.
      void difference​(FlowSet<T> other, FlowSet<T> dest)
      Returns the set difference (this intersect ~other) of this FlowSet and other, putting result into dest.
      FlowSet<T> emptySet()
      returns an empty set, most often more efficient than: ((FlowSet)clone()).clear()
      void intersection​(FlowSet<T> other)
      Returns the intersection (meet) of this FlowSet and other, putting result into this.
      void intersection​(FlowSet<T> other, FlowSet<T> dest)
      Returns the intersection (meet) of this FlowSet and other, putting result into dest.
      boolean isEmpty()
      Returns true if this FlowSet is the empty set.
      boolean isSubSet​(FlowSet<T> other)
      Returns true if the other FlowSet is a subset of this FlowSet.
      Iterator<T> iterator()
      returns an iterator over the elements of the flowSet.
      void remove​(T obj)
      Removes obj from this.
      void remove​(T obj, FlowSet<T> dest)
      Puts this minus obj into dest.
      int size()
      Returns the size of the current FlowSet.
      List<T> toList()
      Returns an unbacked list of contained objects for this FlowSet.
      void union​(FlowSet<T> other)
      Returns the union (join) of this FlowSet and other, putting result into this.
      void union​(FlowSet<T> other, FlowSet<T> dest)
      Returns the union (join) of this FlowSet and other, putting result into dest.
    • Method Detail

      • clone

        FlowSet<T> clone()
        Clones the current FlowSet.
      • emptySet

        FlowSet<T> emptySet()
        returns an empty set, most often more efficient than: ((FlowSet)clone()).clear()
      • copy

        void copy​(FlowSet<T> dest)
        Copies the current FlowSet into dest.
      • clear

        void clear()
        Sets this FlowSet to the empty set (more generally, the bottom element of the lattice.)
      • union

        void union​(FlowSet<T> other)
        Returns the union (join) of this FlowSet and other, putting result into this.
      • union

        void union​(FlowSet<T> other,
                   FlowSet<T> dest)
        Returns the union (join) of this FlowSet and other, putting result into dest. dest, other and this could be the same object.
      • intersection

        void intersection​(FlowSet<T> other)
        Returns the intersection (meet) of this FlowSet and other, putting result into this.
      • intersection

        void intersection​(FlowSet<T> other,
                          FlowSet<T> dest)
        Returns the intersection (meet) of this FlowSet and other, putting result into dest. dest, other and this could be the same object.
      • difference

        void difference​(FlowSet<T> other)
        Returns the set difference (this intersect ~other) of this FlowSet and other, putting result into this.
      • difference

        void difference​(FlowSet<T> other,
                        FlowSet<T> dest)
        Returns the set difference (this intersect ~other) of this FlowSet and other, putting result into dest. dest, other and this could be the same object.
      • isEmpty

        boolean isEmpty()
        Returns true if this FlowSet is the empty set.
      • size

        int size()
        Returns the size of the current FlowSet.
      • add

        void add​(T obj)
        Adds obj to this.
      • add

        void add​(T obj,
                 FlowSet<T> dest)
        puts this union obj into dest.
      • remove

        void remove​(T obj)
        Removes obj from this.
      • remove

        void remove​(T obj,
                    FlowSet<T> dest)
        Puts this minus obj into dest.
      • contains

        boolean contains​(T obj)
        Returns true if this FlowSet contains obj.
      • isSubSet

        boolean isSubSet​(FlowSet<T> other)
        Returns true if the other FlowSet is a subset of this FlowSet.
      • iterator

        Iterator<T> iterator()
        returns an iterator over the elements of the flowSet. Note that the iterator might be backed, and hence be faster in the creation, than doing toList().iterator().
        Specified by:
        iterator in interface Iterable<T>
      • toList

        List<T> toList()
        Returns an unbacked list of contained objects for this FlowSet.
      • copyFreshToExisting

        default void copyFreshToExisting​(FlowSet<T> dest)
        Copies a *fresh* copy of this to dest. The input (this) is not referenced somewhere else. This allows subclasses for a smarter and faster copying.
        Parameters:
        in -
        dest -