T
- Type of the objects contained in the set.public class AtomicMultiSet<T>
extends java.lang.Object
Constructor and Description |
---|
AtomicMultiSet() |
Modifier and Type | Method and Description |
---|---|
int |
add(T object)
Adds object to the set if it was not present, or increments its reference count otherwise.
|
void |
clear() |
boolean |
contains(T object) |
int |
getCount(T object) |
boolean |
isEmpty() |
int |
remove(T object)
Decrements reference count of the object in the set and removes the object if its reference
count reaches zero.
|
int |
size() |
java.lang.String |
toString() |
public int add(T object)
object
- The object to add to the set.public int remove(T object)
object
- The object to remove from the set.public void clear()
public boolean contains(T object)
public int getCount(T object)
public boolean isEmpty()
public int size()
public java.lang.String toString()
toString
in class java.lang.Object