com.limegroup.gnutella.util
Class LimitedArray
java.lang.Object
com.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.
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 |
LimitedArray
public LimitedArray(int size)
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