- size
Returns the number of elements in this bag.
- <init>
- add
Adds the specified element to the end of this bag. If required, it also
increases the capacity of th
- get
Returns the element at the specified position in Bag.
- set
Set element at specified index in the bag.
- clear
Removes all of the elements from this bag. The bag will be empty after this call
returns.
- remove
Removes the first occurrence of the specified element from this Bag, if it is
present. If the Bag do
- getData
Returns this bag's underlying array.Use of this method requires typed instantiation, e.g. Bag(Class)
- addAll
Add all items into this bag.
- contains
Check if bag contains this element.
- ensureCapacity
Check if an item, if added at the given item will fit into the bag. If not, the
bag capacity will be
- safeGet
Returns the element at the specified position in Bag. This method ensures that
the bag grows if the