Package org.drools.core.util
Class Bag<T>
- java.lang.Object
-
- org.drools.core.util.Bag<T>
-
- All Implemented Interfaces:
Serializable,Iterable<T>,Collection<T>
public class Bag<T> extends Object implements Collection<T>, Serializable
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classBag.Counter
-
Constructor Summary
Constructors Constructor Description Bag()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanadd(T t)booleanaddAll(Collection<? extends T> c)voidclear()booleancontains(Object o)booleancontainsAll(Collection<?> c)booleanisEmpty()Iterator<T>iterator()booleanremove(Object o)booleanremoveAll(Collection<?> c)booleanremoveKey(Object o)booleanretainAll(Collection<?> c)intsize()intsizeFor(T t)Object[]toArray()<T1> T1[]toArray(T1[] a)StringtoString()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Collection
equals, hashCode, parallelStream, removeIf, spliterator, stream, toArray
-
-
-
-
Method Detail
-
size
public int size()
- Specified by:
sizein interfaceCollection<T>
-
sizeFor
public int sizeFor(T t)
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmptyin interfaceCollection<T>
-
contains
public boolean contains(Object o)
- Specified by:
containsin interfaceCollection<T>
-
toArray
public Object[] toArray()
- Specified by:
toArrayin interfaceCollection<T>
-
toArray
public <T1> T1[] toArray(T1[] a)
- Specified by:
toArrayin interfaceCollection<T>
-
add
public boolean add(T t)
- Specified by:
addin interfaceCollection<T>
-
remove
public boolean remove(Object o)
- Specified by:
removein interfaceCollection<T>
-
removeKey
public boolean removeKey(Object o)
-
containsAll
public boolean containsAll(Collection<?> c)
- Specified by:
containsAllin interfaceCollection<T>
-
addAll
public boolean addAll(Collection<? extends T> c)
- Specified by:
addAllin interfaceCollection<T>
-
removeAll
public boolean removeAll(Collection<?> c)
- Specified by:
removeAllin interfaceCollection<T>
-
retainAll
public boolean retainAll(Collection<?> c)
- Specified by:
retainAllin interfaceCollection<T>
-
clear
public void clear()
- Specified by:
clearin interfaceCollection<T>
-
-