Package com.github.basking2.sdsai
Class Set<E>
java.lang.Object
com.github.basking2.sdsai.RedBlackTree<E>
com.github.basking2.sdsai.Set<E>
Sets are different than Collections. A group may have
two instance of a data type. A set has either one instance or
no instances.
-
Nested Class Summary
Nested classes/interfaces inherited from class com.github.basking2.sdsai.RedBlackTree
RedBlackTree.RBNode
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
This calles add(o,NODUPKEYS).disjunction
(Set<E> s) This is not a standard set operation, per se.Make a new set consisting of the intersection of two other sets.Make a new set consisting of two other sets.Methods inherited from class com.github.basking2.sdsai.RedBlackTree
add, del, delAll, delObj, empty, find, findAll, first, get, iterator, last, max, member, min, next, prev, print, size
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
Set
public Set()
-
-
Method Details
-
add
This calles add(o,NODUPKEYS). This add is provided for compatibility. WARNING: This does NOT notify the user if the key is not added because the object already exists in the tree.- Overrides:
add
in classRedBlackTree<E>
-
union
Make a new set consisting of two other sets. -
intersect
Make a new set consisting of the intersection of two other sets. -
disjunction
This is not a standard set operation, per se. This the set of all elements that are in one set or the other but not both.
-