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 class
Bag.Counter
-
Constructor Summary
Constructors Constructor Description Bag()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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()
-
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:
size
in interfaceCollection<T>
-
getKeySize
public int getKeySize()
-
sizeFor
public int sizeFor(T t)
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty
in interfaceCollection<T>
-
contains
public boolean contains(Object o)
- Specified by:
contains
in interfaceCollection<T>
-
toArray
public Object[] toArray()
- Specified by:
toArray
in interfaceCollection<T>
-
toArray
public <T1> T1[] toArray(T1[] a)
- Specified by:
toArray
in interfaceCollection<T>
-
add
public boolean add(T t)
- Specified by:
add
in interfaceCollection<T>
-
remove
public boolean remove(Object o)
- Specified by:
remove
in interfaceCollection<T>
-
removeKey
public boolean removeKey(Object o)
-
containsAll
public boolean containsAll(Collection<?> c)
- Specified by:
containsAll
in interfaceCollection<T>
-
addAll
public boolean addAll(Collection<? extends T> c)
- Specified by:
addAll
in interfaceCollection<T>
-
removeAll
public boolean removeAll(Collection<?> c)
- Specified by:
removeAll
in interfaceCollection<T>
-
retainAll
public boolean retainAll(Collection<?> c)
- Specified by:
retainAll
in interfaceCollection<T>
-
clear
public void clear()
- Specified by:
clear
in interfaceCollection<T>
-
-