com.limegroup.gnutella.util
Class LimitedArray

java.lang.Object
  extended bycom.limegroup.gnutella.util.LimitedArray

public class LimitedArray
extends java.lang.Object

this data structure is to be used in place of the ArrayList in the LimitedList class. Even though it is an array, it behaves like a list in how it shifts its elements.


Constructor Summary
LimitedArray(int size)
           
 
Method Summary
 void add(int index, java.lang.Object elem)
          when you add at an index, all the others elements have to shift down
 java.lang.Object get(int index)
           
 void remove(int index)
           
 java.lang.Object[] toArray()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LimitedArray

public LimitedArray(int size)
Method Detail

toArray

public java.lang.Object[] toArray()

get

public java.lang.Object get(int index)

remove

public void remove(int index)

add

public void add(int index,
                java.lang.Object elem)
when you add at an index, all the others elements have to shift down