Constructor and Description |
---|
MultiSet() |
Modifier and Type | Method and Description |
---|---|
void |
add(T obj)
Add an object
|
void |
add(T obj,
long n)
Add an object, with cardinality n
|
void |
clear() |
boolean |
contains(T obj)
Does it contain the object?
|
long |
count(T obj)
Get the count of the number of times the object appears in the multiset - i.e.
|
Iterator<T> |
elements()
Yiled one object per element (i.e without counts)
|
boolean |
isEmpty()
Does it contain any elements at all?
|
Iterator<T> |
iterator() |
void |
remove(T obj)
Remove one occurrence of the object from the multiset
|
void |
remove(T obj,
long n)
Remove N occurrences of the object from the multiset
|
void |
removeAll(T obj)
Remove all occurrences of the object in themultiset
|
int |
size() |
String |
toString() |
public boolean isEmpty()
public boolean contains(T obj)
public void add(T obj)
public void add(T obj, long n)
public void remove(T obj)
public void remove(T obj, long n)
public void removeAll(T obj)
public void clear()
public long count(T obj)
public int size()
Licenced under the Apache License, Version 2.0