Class UnionSetView<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 UnionSetView<E> extends AbstractUnmodifiableCollection<E> implements Set<E>
A view that provides the union of two disjoint sets as a single set. This class does not copy the elements from the sets but merely wraps them. It is expected that the two sets are disjoint, as methods like size() assume that there is no overlap between the elements.

This class provides an unmodifiable view and all modification operations will throw UnsupportedOperationException.

Author:
Mathias Hofer