Package edu.udel.cis.vsl.sarl.util
Class JointSet<E>
java.lang.Object
edu.udel.cis.vsl.sarl.util.JointCollection<E>
edu.udel.cis.vsl.sarl.util.JointSet<E>
- Type Parameters:
E- the type of the elements of the sets
- All Implemented Interfaces:
Iterable<E>,Collection<E>,Set<E>
A set representing the union of two *disjoint* sets. This set is immutable:
the modification methods will all throw UnsupportedOperationException
s.
This set is backed by the two underlying sets. I.e., changes to the underlying sets will be reflected in this set.
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class edu.udel.cis.vsl.sarl.util.JointCollection
add, addAll, clear, contains, containsAll, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArrayMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
-
Constructor Details
-
JointSet
Constructs a new set representing the union of the two disjoint sets set1 and set2. If set1 and set2 are not disjoint (i.e., if there is some x such that set1.contains(x) && set2.contains(x)) the behavior is completely undefined and probably wrong.- Parameters:
set1- the first setset2- the second set
-