Package org.glassfish.pfl.basic.contain
Class MultiSet<E>
java.lang.Object
org.glassfish.pfl.basic.contain.MultiSet<E>
A simple abstraction of a MultiSet, that is, a "set" that can contain
more than one copy of the same element. I am implementing only the
bare minimum that is required for now.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
boolean
static void
void
private static void
shouldBeFalse
(boolean val, String msg) private static void
shouldBeTrue
(boolean val, String msg) int
size()
Return the number of unique elements in this MultiSet.
-
Field Details
-
contents
-
-
Constructor Details
-
MultiSet
public MultiSet()
-
-
Method Details
-
add
-
remove
-
contains
-
size
public int size()Return the number of unique elements in this MultiSet. -
shouldBeTrue
-
shouldBeFalse
-
main
-