org.codehaus.plexus.component.collections

## Class ComponentList<T>

- java.lang.Object
- - org.codehaus.plexus.component.collections.AbstractComponentCollection<T>
  - - org.codehaus.plexus.component.collections.ComponentList<T>

All Implemented Interfaces:
  java.lang.Iterable<T>, java.util.Collection<T>, java.util.List<T>

    public class ComponentList<T>
    extends AbstractComponentCollection<T>
    implements java.util.List<T>

Author:
  Jason van Zyl FIXME: [jdcasey] We need to review the efficiency (in speed and memory) of this collection...

### Field Summary

### Fields inherited from class org.codehaus.plexus.component.collections.AbstractComponentCollection

`componentType, container, hostComponent, logger, role, roleHints`

### Constructor Summary

Constructors
Constructor and Description
`ComponentList(MutablePlexusContainer container, java.lang.Class<T> type, java.lang.String role, java.util.List<java.lang.String> roleHints, java.lang.String hostComponent)`

### Method Summary

Methods
`void` `add(int i, T object)`
`boolean` `add(T object)`
`boolean` `addAll(java.util.Collection<? extends T> collection)`
`boolean` `addAll(int i, java.util.Collection<? extends T> collection)`
`boolean` `contains(java.lang.Object object)`
`boolean` `containsAll(java.util.Collection<?> collection)`
`boolean` `equals(java.lang.Object o)`
`T` `get(int i)`
`int` `hashCode()`
`int` `indexOf(java.lang.Object object)`
`boolean` `isEmpty()`
`java.util.Iterator<T>` `iterator()`
`int` `lastIndexOf(java.lang.Object object)`
`java.util.ListIterator<T>` `listIterator()`
`java.util.ListIterator<T>` `listIterator(int index)`
`protected void` `releaseAllCallback()`
`T` `remove(int i)`
`boolean` `remove(java.lang.Object object)`
`boolean` `removeAll(java.util.Collection<?> collection)`
`boolean` `retainAll(java.util.Collection<?> collection)`
`T` `set(int i, T object)`
`int` `size()`
`java.util.List<T>` `subList(int fromIndex, int toIndex)`
`java.lang.Object[]` `toArray()`
`java.lang.Object[]` `toArray(java.lang.Object[] ts)`

### Methods inherited from class org.codehaus.plexus.component.collections.AbstractComponentCollection

`checkUpdate, clear, getComponentDescriptorMap, lookup`

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

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

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

`clear`

### Constructor Detail

#### ComponentList

    public ComponentList(MutablePlexusContainer container,
                 java.lang.Class<T> type,
                 java.lang.String role,
                 java.util.List<java.lang.String> roleHints,
                 java.lang.String hostComponent)

### Method Detail

#### size

    public int size()

Specified by:
  `size` in interface `java.util.Collection<T>`
Specified by:
  `size` in interface `java.util.List<T>`

#### isEmpty

    public boolean isEmpty()

Specified by:
  `isEmpty` in interface `java.util.Collection<T>`
Specified by:
  `isEmpty` in interface `java.util.List<T>`

#### contains

    public boolean contains(java.lang.Object object)

Specified by:
  `contains` in interface `java.util.Collection<T>`
Specified by:
  `contains` in interface `java.util.List<T>`

#### iterator

    public java.util.Iterator<T> iterator()

Specified by:
  `iterator` in interface `java.lang.Iterable<T>`
Specified by:
  `iterator` in interface `java.util.Collection<T>`
Specified by:
  `iterator` in interface `java.util.List<T>`

#### toArray

    public java.lang.Object[] toArray()

Specified by:
  `toArray` in interface `java.util.Collection<T>`
Specified by:
  `toArray` in interface `java.util.List<T>`

#### toArray

    public java.lang.Object[] toArray(java.lang.Object[] ts)

Specified by:
  `toArray` in interface `java.util.Collection<T>`
Specified by:
  `toArray` in interface `java.util.List<T>`

#### add

    public boolean add(T object)

Specified by:
  `add` in interface `java.util.Collection<T>`
Specified by:
  `add` in interface `java.util.List<T>`

#### remove

    public boolean remove(java.lang.Object object)

Specified by:
  `remove` in interface `java.util.Collection<T>`
Specified by:
  `remove` in interface `java.util.List<T>`

#### containsAll

    public boolean containsAll(java.util.Collection<?> collection)

Specified by:
  `containsAll` in interface `java.util.Collection<T>`
Specified by:
  `containsAll` in interface `java.util.List<T>`

#### addAll

    public boolean addAll(java.util.Collection<? extends T> collection)

Specified by:
  `addAll` in interface `java.util.Collection<T>`
Specified by:
  `addAll` in interface `java.util.List<T>`

#### addAll

    public boolean addAll(int i,
                 java.util.Collection<? extends T> collection)

Specified by:
  `addAll` in interface `java.util.List<T>`

#### removeAll

    public boolean removeAll(java.util.Collection<?> collection)

Specified by:
  `removeAll` in interface `java.util.Collection<T>`
Specified by:
  `removeAll` in interface `java.util.List<T>`

#### retainAll

    public boolean retainAll(java.util.Collection<?> collection)

Specified by:
  `retainAll` in interface `java.util.Collection<T>`
Specified by:
  `retainAll` in interface `java.util.List<T>`

#### equals

    public boolean equals(java.lang.Object o)

Specified by:
  `equals` in interface `java.util.Collection<T>`
Specified by:
  `equals` in interface `java.util.List<T>`
Overrides:
  `equals` in class `java.lang.Object`

#### hashCode

    public int hashCode()

Specified by:
  `hashCode` in interface `java.util.Collection<T>`
Specified by:
  `hashCode` in interface `java.util.List<T>`
Overrides:
  `hashCode` in class `java.lang.Object`

#### get

    public T get(int i)

Specified by:
  `get` in interface `java.util.List<T>`

#### set

    public T set(int i,
        T object)

Specified by:
  `set` in interface `java.util.List<T>`

#### add

    public void add(int i,
           T object)

Specified by:
  `add` in interface `java.util.List<T>`

#### remove

    public T remove(int i)

Specified by:
  `remove` in interface `java.util.List<T>`

#### indexOf

    public int indexOf(java.lang.Object object)

Specified by:
  `indexOf` in interface `java.util.List<T>`

#### lastIndexOf

    public int lastIndexOf(java.lang.Object object)

Specified by:
  `lastIndexOf` in interface `java.util.List<T>`

#### listIterator

    public java.util.ListIterator<T> listIterator()

Specified by:
  `listIterator` in interface `java.util.List<T>`

#### listIterator

    public java.util.ListIterator<T> listIterator(int index)

Specified by:
  `listIterator` in interface `java.util.List<T>`

#### subList

    public java.util.List<T> subList(int fromIndex,
                            int toIndex)

Specified by:
  `subList` in interface `java.util.List<T>`

#### releaseAllCallback

    protected void releaseAllCallback()

Specified by:
  `releaseAllCallback` in class `AbstractComponentCollection<T>`