Interface CompositeSet.SetMutator<E>
- Type Parameters:
- E- the type of the elements in this instance.
- All Superinterfaces:
- Serializable
- Enclosing class:
- CompositeSet<E>
Defines callbacks for mutation operations.
- Since:
- 3.0
- 
Method SummaryModifier and TypeMethodDescriptionbooleanCalled when an object is to be added to the composite.booleanaddAll(CompositeSet<E> composite, List<Set<E>> sets, Collection<? extends E> coll) Called when a collection is to be added to the composite.voidresolveCollision(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 Details- 
addCalled when an object is to be added to the composite.- Parameters:
- composite- the CompositeSet being changed
- sets- all of the Set instances in this CompositeSet
- obj- the object being added
- Returns:
- true if the collection is changed
- Throws:
- UnsupportedOperationException- if add is unsupported
- ClassCastException- if the object cannot be added due to its type
- NullPointerException- if the object cannot be added because its null
- IllegalArgumentException- if the object cannot be added
 
- 
addAllCalled when a collection is to be added to the composite.- Parameters:
- composite- the CompositeSet being changed
- sets- all of the Set instances in this CompositeSet
- coll- the collection being added
- Returns:
- true if the collection is changed
- Throws:
- UnsupportedOperationException- if add is unsupported
- ClassCastException- if the object cannot be added due to its type
- NullPointerException- if the object cannot be added because its null
- IllegalArgumentException- if the object cannot be added
 
- 
resolveCollisionvoid 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 addedandexistingstill 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
 
 
-