Class MinusSetView<E>

java.lang.Object
Type Parameters:
E - the type of elements in this set
All Implemented Interfaces:
Iterable<E>, Collection<E>, Set<E>

public final class MinusSetView<E> extends AbstractUnmodifiableCollection<E> implements Set<E>
A view that represents the result of subtracting one set from another. Specifically, this class models the set difference: superset - subset.

The class assumes that all elements of the subset are contained in the superset. This property must be ensured by the caller; the class does not perform any validation checks for this condition.

This is an unmodifiable view, and all mutating operations will throw an UnsupportedOperationException.

Author:
Mathias Hofer