jfun.yan.element
Class ListStore<T>

java.lang.Object
  extended by jfun.yan.element.ListStore<T>
All Implemented Interfaces:
ElementStore<T>

public class ListStore<T>
extends java.lang.Object
implements ElementStore<T>

This implementation stores component instances into a java.util.List.

Author:
Ben Yu Nov 12, 2005 2:29:12 PM

Constructor Summary
ListStore(java.util.List<T> list)
          Create a ListStore object.
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 java.util.List<T> getList()
          Get the list object storing the component instances.
 int hashCode()
           
 void storeElement(int ind, T obj)
          Store an element.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ListStore

public ListStore(java.util.List<T> list)
Create a ListStore object.

Parameters:
list - the list to store component instances.
Method Detail

getList

public java.util.List<T> getList()
Get the list object storing the component instances.


storeElement

public void storeElement(int ind,
                         T obj)
Description copied from interface: ElementStore
Store an element.

Specified by:
storeElement in interface ElementStore<T>
Parameters:
ind - the element index.
obj - the element value.

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object