org.apache.commons.configuration
Class AbstractConfiguration.Container

java.lang.Object
  extended byorg.apache.commons.configuration.AbstractConfiguration.Container
Enclosing class:
AbstractConfiguration

static class AbstractConfiguration.Container
extends java.lang.Object

Private Wrapper class for List, so we can distinguish between List objects and our container


Field Summary
private  java.util.List list
          We're wrapping a List object (A List)
 
Constructor Summary
AbstractConfiguration.Container()
          C'tor
 
Method Summary
 void add(java.lang.Object o)
          Add an Object to the Container
 java.util.List asList()
          Returns the Elements of the Container as a List.
 java.lang.Object get(int index)
          Returns the Element at an index
 java.util.Iterator iterator()
          Returns an Iterator over the container objects
 int size()
          Returns the current size of the Container
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

list

private java.util.List list
We're wrapping a List object (A List)

Constructor Detail

AbstractConfiguration.Container

public AbstractConfiguration.Container()
C'tor

Method Detail

add

public void add(java.lang.Object o)
Add an Object to the Container

Parameters:
o - The Object

size

public int size()
Returns the current size of the Container

Returns:
The Number of elements in the container

get

public java.lang.Object get(int index)
Returns the Element at an index

Parameters:
index - The Index
Returns:
The element at that index

iterator

public java.util.Iterator iterator()
Returns an Iterator over the container objects

Returns:
An Iterator

asList

public java.util.List asList()
Returns the Elements of the Container as a List. This is not the internal list element but a shallow copy of the internal list. You may modify the returned list without modifying the container.

Returns:
A List containing the elements of the Container.