com.glaivestone.javax.util
Interface AssociationList

All Superinterfaces:
java.util.Collection, java.util.List
All Known Implementing Classes:
AssociationArrayList

public interface AssociationList
extends java.util.List

This interface represents a list of Association objects (key-value pairs).

Note that types like this interface will not be needed when support for generics is added to the Java language. However, even with such language support a specifically typed interface such as this can still have some value by providing a more straightforward notation than the probable '<' and '>' C++-template-like notation used to support generics.

Version:
1.0
Author:
Gary Gregory
See Also:
List

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 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
 

Method Detail

add

public 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.

See Also:
List.add(Object)

getAssociation

public Association getAssociation(int index)
Returns the element at the specified position in this list.


toAssociationArray

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

Returns:
an array containing all of the elements in this list in the correct order.

associationIterator

public AssociationIterator associationIterator()
Returns an iterator on the associations in this list.


GFL 1.1 API