public class HashBag<T> extends Object implements Bag<T>
| Constructor and Description |
|---|
HashBag() |
HashBag(Bag<? extends T> b) |
HashBag(Collection<? extends T> c) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(T t) |
boolean |
add(T t,
int multiple) |
boolean |
addAll(Collection<? extends T> c) |
void |
clear() |
boolean |
contains(Object obj) |
boolean |
containsAll(Bag<?> b) |
boolean |
containsAll(Collection<?> c) |
Set<Map.Entry<T,Integer>> |
entrySet() |
boolean |
equals(Object obj) |
Integer |
get(T t) |
int |
hashCode() |
boolean |
isEmpty() |
Iterator<T> |
iterator() |
Set<T> |
keySet() |
boolean |
remove(Object obj) |
boolean |
remove(T t,
int multiple) |
boolean |
removeAll(Collection<?> c) |
boolean |
retainAll(Collection<?> c) |
int |
size() |
T[] |
toArray() |
<T1> T1[] |
toArray(T1[] a) |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitspliteratorparallelStream, removeIf, streampublic HashBag()
public HashBag(Collection<? extends T> c)
public int size()
size in interface Collection<T>public boolean isEmpty()
isEmpty in interface Collection<T>public boolean contains(Object obj)
contains in interface Collection<T>public boolean containsAll(Collection<?> c)
containsAll in interface Collection<T>public boolean containsAll(Bag<?> b)
public boolean add(T t)
add in interface Collection<T>public boolean remove(Object obj)
remove 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>public T[] toArray()
toArray in interface Collection<T>public <T1> T1[] toArray(T1[] a)
toArray in interface Collection<T>public int hashCode()
hashCode in interface Collection<T>hashCode in class ObjectCopyright © 2019. All rights reserved.