|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.jena.atlas.lib.MultiSet<T>
public class MultiSet<T>
A MultiSet - also known as a Bag
Constructor Summary | |
---|---|
MultiSet()
|
Method Summary | |
---|---|
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()
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public MultiSet()
Method Detail |
---|
public boolean isEmpty()
public boolean contains(T obj)
public Iterator<T> elements()
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()
public Iterator<T> iterator()
iterator
in interface Iterable<T>
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |