Class ArraysPlume.Partitioning<T extends @NonNull Object>

Type Parameters:
T - the type of the elements of the sets
All Implemented Interfaces:
Serializable, Cloneable, Iterable<ArrayList<T>>, Collection<ArrayList<T>>, List<ArrayList<T>>, RandomAccess
Enclosing class:
ArraysPlume

static class ArraysPlume.Partitioning<T extends @NonNull Object> extends ArrayList<ArrayList<T>>
A partitioning is a set of sets. It adds a few methods to ArrayList<ArrayList<T>>.
  • Field Details

    • serialVersionUID

      static final long serialVersionUID
      Unique identifier for serialization. If you add or remove fields, change this number.
      See Also:
  • Constructor Details

    • Partitioning

      Partitioning()
      Empty constructor.
    • Partitioning

      Partitioning(ArraysPlume.Partitioning<T> other)
      Copy constructor.
      Parameters:
      other - the Partitioning to make a copy of
  • Method Details

    • partitionedSet

      List<T> partitionedSet()
      The set that has been partitioned. That is, all the elements that have been added to this. Equivalently, the union of all the partitions.
      Returns:
      all the elements in any part of the Partitioning
    • isPartitioningFor

      boolean isPartitioningFor(List<T> elts)
      True if this is a partitioning for elts.
      Parameters:
      elts - the elements that might be partitioned by this
      Returns:
      true if this is a partitioning for elts
    • addToPart

      ArraysPlume.Partitioning<T> addToPart(@org.checkerframework.checker.index.qual.NonNegative int i, T elt)
      Returns a new partitioning just like this one, but with elt added to the ith part.
      Parameters:
      i - the index of an existing part, or the current size (to create a new part)
      elt - the element to add
      Returns:
      a new partitioning just like this one, but with elt added to the ith part