public class UpdatableBagImpl extends java.lang.Object implements UpdatableBag
Modifier and Type | Field and Description |
---|---|
protected int |
m_capacityIncrement |
protected int |
m_initialCapacity |
protected java.util.Vector |
m_objects |
Constructor and Description |
---|
UpdatableBagImpl() |
UpdatableBagImpl(int initialCapacity) |
UpdatableBagImpl(int initialCapacity,
int capacityIncrement) |
Modifier and Type | Method and Description |
---|---|
void |
add(java.lang.Object element) |
void |
addElements(java.util.Enumeration e) |
void |
addIfAbsent(java.lang.Object element) |
void |
clear() |
protected java.lang.Object |
clone() |
Collection |
duplicate() |
java.util.Enumeration |
elements() |
void |
exclude(java.lang.Object element) |
boolean |
includes(java.lang.Object element) |
boolean |
isEmpty() |
static void |
main(java.lang.String[] argv) |
void |
removeElements(java.util.Enumeration e) |
void |
removeOneOf(java.lang.Object element) |
int |
size() |
java.lang.Object |
take() |
protected java.util.Vector m_objects
protected int m_initialCapacity
protected int m_capacityIncrement
public UpdatableBagImpl()
public UpdatableBagImpl(int initialCapacity)
public UpdatableBagImpl(int initialCapacity, int capacityIncrement)
public Collection duplicate()
duplicate
in interface Collection
protected java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
in class java.lang.Object
java.lang.CloneNotSupportedException
public int size()
size
in interface Collection
public boolean isEmpty()
isEmpty
in interface Collection
public boolean includes(java.lang.Object element)
includes
in interface Collection
public java.util.Enumeration elements()
elements
in interface Collection
public void clear()
clear
in interface UpdatableCollection
public void add(java.lang.Object element)
add
in interface UpdatableBag
public void addIfAbsent(java.lang.Object element)
addIfAbsent
in interface UpdatableBag
public void removeOneOf(java.lang.Object element)
removeOneOf
in interface UpdatableCollection
public void exclude(java.lang.Object element)
exclude
in interface UpdatableCollection
public java.lang.Object take() throws java.util.NoSuchElementException
take
in interface UpdatableCollection
java.util.NoSuchElementException
public void addElements(java.util.Enumeration e)
addElements
in interface UpdatableBag
public void removeElements(java.util.Enumeration e)
removeElements
in interface UpdatableCollection
public static void main(java.lang.String[] argv)