Interface CompositeSet.SetMutator<E>

    • Method Summary

      Modifier and Type Method and Description
      boolean add(CompositeSet<E> composite, List<Set<E>> sets, E obj)
      Called when an object is to be added to the composite.
      boolean addAll(CompositeSet<E> composite, List<Set<E>> sets, Collection<? extends E> coll)
      Called when a collection is to be added to the composite.
      void resolveCollision(CompositeSet<E> comp, Set<E> existing, Set<E> added, Collection<E> intersects)
      Called when a Set is added to the CompositeSet and there is a collision between existing and added sets.
    • Method Detail

      • resolveCollision

        void resolveCollision(CompositeSet<E> comp,
                              Set<E> existing,
                              Set<E> added,
                              Collection<E> intersects)
        Called when a Set is added to the CompositeSet and there is a collision between existing and added sets.

        If added and existing still have any intersects after this method returns an IllegalArgumentException will be thrown.

        Parameters:
        comp - the CompositeSet being modified
        existing - the Set already existing in the composite
        added - the Set being added to the composite
        intersects - the intersection of the existing and added sets