- <init>
Constructs an empty Bag with the specified initial capacity.
- ensureCapacity
Check if an item, if added at the given item will fit into the bag. If not, the
bag capacity will be
- get
Returns the element at the specified position in Bag.
- unsafeSet
- add
Adds the specified element to the end of this bag. If required, it also
increases the capacity of th
- grow
Increase the capacity of the bag.
- remove
Removes the element at the specified position in this Bag. It does this by
overwriting it was last e
- size
Returns the number of elements in this bag.