jfun.yan.element
Class ArrayStore<T>

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

public class ArrayStore<T>
extends AnyArrayStore<T>

This class stores component instances into an Object[] array.

Author:
Ben Yu Nov 12, 2005 2:19:48 PM

Constructor Summary
ArrayStore(T[] arr)
          To create an ArrayStore object.
ArrayStore(T[] arr, int begin)
          To create an ArrayStore object.
ArrayStore(T[] arr, int begin, int end)
          To create an ArrayStore object.
 
Method Summary
 T[] getArray()
          Get the array object to store the component instances.
 void storeElement(int ind, T obj)
          Store an element.
 
Methods inherited from class jfun.yan.element.AnyArrayStore
equals, getArrayObject, getBegin, getEnd, getIndex, hashCode, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ArrayStore

public ArrayStore(T[] arr,
                  int begin,
                  int end)
To create an ArrayStore object.

Parameters:
arr - the array object
begin - the begin index of the array. Elements are stored from this index.
end - the non-inclusive end index. Elements cannot be stored at or after this index.

ArrayStore

public ArrayStore(T[] arr,
                  int begin)
To create an ArrayStore object.

Parameters:
arr - the array object
begin - the begin index of the array. Elements are stored from this index.

ArrayStore

public ArrayStore(T[] arr)
To create an ArrayStore object.

Parameters:
arr - the array object.
Method Detail

getArray

public T[] getArray()
Get the array object to store 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>
Overrides:
storeElement in class AnyArrayStore<T>
Parameters:
ind - the element index.
obj - the element value.