public final class HashBag<T> extends Object implements Set<T>
Constructor and Description |
---|
HashBag() |
HashBag(int initialCapacity) |
HashBag(int initialCapacity,
float loadFactor) |
HashBag(Map<? extends T,? extends org.eclipse.net4j.util.collection.HashBag.Counter> m) |
Modifier and Type | Method and Description |
---|---|
boolean |
add(T o) |
boolean |
add(T o,
int count) |
boolean |
addAll(Collection<? extends T> c) |
void |
clear() |
boolean |
contains(Object o) |
boolean |
containsAll(Collection<?> c) |
int |
getCounterFor(T o) |
boolean |
isEmpty() |
Iterator<T> |
iterator() |
boolean |
remove(Object o) |
boolean |
remove(Object o,
int count) |
boolean |
removeAll(Collection<?> c) |
int |
removeCounterFor(T o) |
boolean |
retainAll(Collection<?> c) |
int |
size() |
Object[] |
toArray() |
<T> T[] |
toArray(T[] a) |
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
equals, hashCode, spliterator
parallelStream, removeIf, stream
public HashBag()
public HashBag(int initialCapacity, float loadFactor)
public HashBag(int initialCapacity)
public int getCounterFor(T o)
public int removeCounterFor(T o)
public boolean add(T o)
public boolean add(T o, int count)
public boolean addAll(Collection<? extends T> c)
public void clear()
public boolean contains(Object o)
public boolean containsAll(Collection<?> c)
containsAll
in interface Collection<T>
containsAll
in interface Set<T>
public boolean isEmpty()
public boolean remove(Object o)
public boolean remove(Object o, int count)
public boolean removeAll(Collection<?> c)
public boolean retainAll(Collection<?> c)
public int size()
public Object[] toArray()
public <T> T[] toArray(T[] a)
Copyright (c) 2014 Eike Stepper (Berlin, Germany) and others.
All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html