0.10.8-alpha
|
A set where each element can be present more than once. More...
Classes | |
class | GetCardinalities |
Gets the cardinalities of each element in a multiset. More... | |
class | Insert |
Given a multiset and an element, returns a new multiset with this element added to it. More... | |
class | PutInto |
Puts incoming events into a multiset, and returns this set. More... | |
Public Member Functions | |
Multiset () | |
Creates an empty multiset. More... | |
Multiset (Multiset m) | |
Creates a multiset from the contents of another one. More... | |
Multiset | addAll (Multiset b) |
Performs the union of two multisets. More... | |
boolean | addAll (Collection<? extends Object > arg0) |
Object | getAnyElement () |
Picks one element of the multiset. More... | |
boolean | contains (Object o) |
Checks if an element is contained (at least once) into this multiset. More... | |
Multiset | addElement (Object o) |
Adds an element to this multiset. More... | |
boolean | add (Object o) |
int | get (Object o) |
Gets the cardinality of an element. More... | |
Set< Object > | keySet () |
Gets the (normal) set of all elements in this multiset. More... | |
Multiset | removeElement (Object o, int times) |
Removes an element from this multiset. More... | |
int | size () |
Gets the size of the multiset. More... | |
void | clear () |
String | toString () |
boolean | containsAll (Collection<?> arg0) |
boolean | isEmpty () |
Iterator< Object > | iterator () |
boolean | remove (Object arg0) |
boolean | remove (Object arg0, int times) |
Removes an element a number of times. More... | |
boolean | removeAll (Collection<?> arg0) |
boolean | retainAll (Collection<?> arg0) |
Object [] | toArray () |
Static Public Attributes | |
static final transient GetCardinalities | getCardinalities = new GetCardinalities() |
A single visible instance of the GetCardinalities function. More... | |
A set where each element can be present more than once.
Definition at line 35 of file Multiset.java.
ca.uqac.lif.cep.util.Multiset.Multiset | ( | ) |
Creates an empty multiset.
Definition at line 51 of file Multiset.java.
ca.uqac.lif.cep.util.Multiset.Multiset | ( | Multiset | m | ) |
Creates a multiset from the contents of another one.
m | The other multiset |
Definition at line 61 of file Multiset.java.
boolean ca.uqac.lif.cep.util.Multiset.add | ( | Object | o | ) |
Definition at line 156 of file Multiset.java.
Performs the union of two multisets.
b | The multiset to add |
Definition at line 73 of file Multiset.java.
boolean ca.uqac.lif.cep.util.Multiset.addAll | ( | Collection<? extends Object > | arg0 | ) |
Definition at line 91 of file Multiset.java.
Multiset ca.uqac.lif.cep.util.Multiset.addElement | ( | Object | o | ) |
Adds an element to this multiset.
o | The element |
Definition at line 141 of file Multiset.java.
void ca.uqac.lif.cep.util.Multiset.clear | ( | ) |
Definition at line 225 of file Multiset.java.
boolean ca.uqac.lif.cep.util.Multiset.contains | ( | Object | o | ) |
Checks if an element is contained (at least once) into this multiset.
o | The element |
Definition at line 126 of file Multiset.java.
boolean ca.uqac.lif.cep.util.Multiset.containsAll | ( | Collection<?> | arg0 | ) |
Definition at line 237 of file Multiset.java.
int ca.uqac.lif.cep.util.Multiset.get | ( | Object | o | ) |
Gets the cardinality of an element.
o | The element |
Definition at line 167 of file Multiset.java.
Object ca.uqac.lif.cep.util.Multiset.getAnyElement | ( | ) |
Picks one element of the multiset.
This assumes you don't care about what element of the multiset you get, as long as you get one.
Definition at line 110 of file Multiset.java.
boolean ca.uqac.lif.cep.util.Multiset.isEmpty | ( | ) |
Definition at line 266 of file Multiset.java.
Iterator<Object> ca.uqac.lif.cep.util.Multiset.iterator | ( | ) |
Definition at line 272 of file Multiset.java.
Set<Object> ca.uqac.lif.cep.util.Multiset.keySet | ( | ) |
Gets the (normal) set of all elements in this multiset.
In other words, turns this multiset into a regular set.
Definition at line 181 of file Multiset.java.
boolean ca.uqac.lif.cep.util.Multiset.remove | ( | Object | arg0 | ) |
Definition at line 278 of file Multiset.java.
boolean ca.uqac.lif.cep.util.Multiset.remove | ( | Object | arg0, |
int | times | ||
) |
Removes an element a number of times.
arg0 | The element |
times | The number of times to remove it |
Definition at line 290 of file Multiset.java.
boolean ca.uqac.lif.cep.util.Multiset.removeAll | ( | Collection<?> | arg0 | ) |
Definition at line 301 of file Multiset.java.
Multiset ca.uqac.lif.cep.util.Multiset.removeElement | ( | Object | o, |
int | times | ||
) |
Removes an element from this multiset.
o | The element |
times | The number of times to remove this element |
Definition at line 192 of file Multiset.java.
boolean ca.uqac.lif.cep.util.Multiset.retainAll | ( | Collection<?> | arg0 | ) |
Definition at line 326 of file Multiset.java.
int ca.uqac.lif.cep.util.Multiset.size | ( | ) |
Object [] ca.uqac.lif.cep.util.Multiset.toArray | ( | ) |
Definition at line 374 of file Multiset.java.
String ca.uqac.lif.cep.util.Multiset.toString | ( | ) |
Definition at line 231 of file Multiset.java.
|
static |
A single visible instance of the GetCardinalities function.
Definition at line 40 of file Multiset.java.