com.glaivestone.javax.util
Class AssociationArrayList

java.lang.Object
  |
  +--java.util.AbstractCollection
        |
        +--java.util.AbstractList
              |
              +--java.util.ArrayList
                    |
                    +--com.glaivestone.javax.util.AssociationArrayList
All Implemented Interfaces:
AssociationList, java.lang.Cloneable, java.util.Collection, java.util.List, java.util.RandomAccess, java.io.Serializable

public class AssociationArrayList
extends java.util.ArrayList
implements AssociationList

This class implements AssociationList to provide a list of Association objects (key-value pairs).

Version:
1.0
Author:
Gary Gregory
See Also:
List, Serialized Form

Constructor Summary
AssociationArrayList()
           
 
Method Summary
 boolean add(java.lang.Object key, java.lang.Object value)
          Creates an Association based on the given key-value pair and adds it to the list.
 AssociationIterator associationIterator()
          Returns an iterator on the associations in this list.
 Association getAssociation(int index)
          Returns the element at the specified position in this list.
 Association[] toAssociationArray()
          Returns an array containing all of the elements in this list in the correct order.
 
Methods inherited from class java.util.ArrayList
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, remove, set, size, toArray, toArray, trimToSize
 
Methods inherited from class java.util.AbstractList
equals, hashCode, iterator, listIterator, listIterator, subList
 
Methods inherited from class java.util.AbstractCollection
containsAll, remove, removeAll, retainAll, toString
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
add, add, addAll, addAll, clear, contains, containsAll, equals, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, retainAll, set, size, subList, toArray, toArray
 

Constructor Detail

AssociationArrayList

public AssociationArrayList()
Method Detail

add

public boolean add(java.lang.Object key,
                   java.lang.Object value)
Description copied from interface: AssociationList
Creates an Association based on the given key-value pair and adds it to the list.

Specified by:
add in interface AssociationList
See Also:
List.add(Object)

getAssociation

public Association getAssociation(int index)
Description copied from interface: AssociationList
Returns the element at the specified position in this list.

Specified by:
getAssociation in interface AssociationList

toAssociationArray

public Association[] toAssociationArray()
Returns an array containing all of the elements in this list in the correct order.

Specified by:
toAssociationArray in interface AssociationList
Returns:
an array containing all of the elements in this list in the correct order.

associationIterator

public AssociationIterator associationIterator()
Description copied from interface: AssociationList
Returns an iterator on the associations in this list.

Specified by:
associationIterator in interface AssociationList

GFL 1.1 API