Package org.eclipse.m2m.atl.engine.emfvm.lib

# Class Bag

java.lang.Object
org.eclipse.m2m.atl.engine.emfvm.lib.Bag

All Implemented Interfaces:
  `Iterable<Object>`, `Collection<Object>`

public class Bag extends Object implements Collection<Object>
Bag collection implementation.

## Constructor Summary

Constructors
Constructor
Description
`Bag()`
Constructor.
`Bag(Collection<?> arg0)`
Constructor parameterized with an existing collection.

## Method Summary

Modifier and Type
Method
Description
`boolean`
`add(Object arg0)`
`boolean`
`addAll(Collection<?> arg0)`
`void`
`clear()`
`boolean`
`contains(Object arg0)`
`boolean`
`containsAll(Collection<?> arg0)`
`boolean`
`isEmpty()`
`Iterator<Object>`
`iterator()`
`boolean`
`remove(Object arg0)`
`boolean`
`removeAll(Collection<?> arg0)`
`boolean`
`retainAll(Collection<?> arg0)`
`int`
`size()`
`Object[]`
`toArray()`
`Object[]`
`toArray(Object[] arg0)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Methods inherited from interface java.util.Collection

`equals, hashCode, parallelStream, removeIf, spliterator, stream, toArray`

### Methods inherited from interface java.lang.Iterable

`forEach`

## Constructor Details

### Bag

public Bag()
Constructor.

### Bag

public Bag(Collection<?> arg0)
Constructor parameterized with an existing collection.

Parameters:
  `arg0` - the collection

## Method Details

### add

public boolean add(Object arg0)

Specified by:
  `add` in interface `Collection<Object>`
See Also:
  - `Collection.add(java.lang.Object)`

### addAll

public boolean addAll(Collection<?> arg0)

Specified by:
  `addAll` in interface `Collection<Object>`
See Also:
  - `Collection.addAll(java.util.Collection)`

### clear

public void clear()

Specified by:
  `clear` in interface `Collection<Object>`
See Also:
  - `Collection.clear()`

### contains

public boolean contains(Object arg0)

Specified by:
  `contains` in interface `Collection<Object>`
See Also:
  - `Collection.contains(java.lang.Object)`

### containsAll

public boolean containsAll(Collection<?> arg0)

Specified by:
  `containsAll` in interface `Collection<Object>`
See Also:
  - `Collection.containsAll(java.util.Collection)`

### isEmpty

public boolean isEmpty()

Specified by:
  `isEmpty` in interface `Collection<Object>`
See Also:
  - `Collection.isEmpty()`

### remove

public boolean remove(Object arg0)

Specified by:
  `remove` in interface `Collection<Object>`
See Also:
  - `Collection.remove(java.lang.Object)`

### removeAll

public boolean removeAll(Collection<?> arg0)

Specified by:
  `removeAll` in interface `Collection<Object>`
See Also:
  - `Collection.removeAll(java.util.Collection)`

### size

public int size()

Specified by:
  `size` in interface `Collection<Object>`
See Also:
  - `Collection.size()`

### iterator

public Iterator<Object> iterator()

Specified by:
  `iterator` in interface `Collection<Object>`
Specified by:
  `iterator` in interface `Iterable<Object>`
See Also:
  - `Collection.iterator()`

### retainAll

public boolean retainAll(Collection<?> arg0)

Specified by:
  `retainAll` in interface `Collection<Object>`
See Also:
  - `Collection.retainAll(java.util.Collection)`

### toArray

public Object[] toArray()

Specified by:
  `toArray` in interface `Collection<Object>`
See Also:
  - `Collection.toArray()`

### toArray

public Object[] toArray(Object[] arg0)

Specified by:
  `toArray` in interface `Collection<Object>`
See Also:
  - `Collection.toArray(Object[])`