com.inet.jortho
Class LowMemoryArrayList<E>

java.lang.Object
  extended by com.inet.jortho.LowMemoryArrayList<E>

public class LowMemoryArrayList<E>
extends java.lang.Object

An ArrayList that need only a minimum of memory size. The list will be need on reading the dictionary with a very large count.


Constructor Summary
LowMemoryArrayList()
           
 
Method Summary
 void add(E o)
          Appends the specified element to the end of this list.
 void add(int index, E element)
          Inserts the specified element at the specified position in this list.
 E get(int index)
          Returns the element at the specified position in this list.
 int size()
          Returns the number of elements in this list.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LowMemoryArrayList

public LowMemoryArrayList()
Method Detail

size

public int size()
Returns the number of elements in this list.

Returns:
the number of elements in this list.

get

public E get(int index)
Returns the element at the specified position in this list.

Parameters:
index - index of the element to return
Returns:
the element at the specified position in this list
Throws:
java.lang.IndexOutOfBoundsException - if the index is out of range

add

public void add(E o)
Appends the specified element to the end of this list.

Parameters:
o - element to be appended to this list.

add

public void add(int index,
                E element)
Inserts the specified element at the specified position in this list. Shifts the element currently at that position (if any) and any subsequent elements to the right (adds one to their indices).

Parameters:
index - index at which the specified element is to be inserted
element - element to be inserted
Throws:
java.lang.IndexOutOfBoundsException - if the index is out of range


Copyright © 2005 - 2009 i-net software. All Rights Reserved.