public class Bag<T> extends Object implements Collection<T>, Serializable
Modifier and Type | Class and Description |
---|---|
static class |
Bag.Counter |
Constructor and Description |
---|
Bag() |
Modifier and Type | Method and Description |
---|---|
boolean |
add(T t) |
boolean |
addAll(Collection<? extends T> c) |
void |
clear() |
boolean |
contains(Object o) |
boolean |
containsAll(Collection<?> c) |
int |
getKeySize() |
boolean |
isEmpty() |
Iterator<T> |
iterator() |
boolean |
remove(Object o) |
boolean |
removeAll(Collection<?> c) |
boolean |
removeKey(Object o) |
boolean |
retainAll(Collection<?> c) |
int |
size() |
int |
sizeFor(T t) |
Object[] |
toArray() |
<T1> T1[] |
toArray(T1[] a) |
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
equals, hashCode
public int size()
size
in interface Collection<T>
public int getKeySize()
public int sizeFor(T t)
public boolean isEmpty()
isEmpty
in interface Collection<T>
public boolean contains(Object o)
contains
in interface Collection<T>
public Object[] toArray()
toArray
in interface Collection<T>
public <T1> T1[] toArray(T1[] a)
toArray
in interface Collection<T>
public boolean add(T t)
add
in interface Collection<T>
public boolean remove(Object o)
remove
in interface Collection<T>
public boolean removeKey(Object o)
public boolean containsAll(Collection<?> c)
containsAll
in interface Collection<T>
public boolean addAll(Collection<? extends T> c)
addAll
in interface Collection<T>
public boolean removeAll(Collection<?> c)
removeAll
in interface Collection<T>
public boolean retainAll(Collection<?> c)
retainAll
in interface Collection<T>
public void clear()
clear
in interface Collection<T>
Copyright © 2001–2016 JBoss by Red Hat. All rights reserved.