Class UnionMethodSet<E>

java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractSet<E>
com.aoapps.collections.UnionMethodSet<E>
All Implemented Interfaces:
Iterable<E>, Collection<E>, Set<E>

public class UnionMethodSet<E> extends AbstractSet<E>
A union set that assumes objects of different classes are not equal. It obtains the objects by invoking the provided methods. The provided methods will be invoked on an as-needed basis. It never does any combining.

The following assumptions are made:

  1. All elements of the returned sets are of the same exact class (within a single method)
  2. Objects of different classes are not equal.
  3. No set will contain null
Author:
AO Industries, Inc.
See Also: