|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IndexList<E>
An interface for array lists.
Method Summary | |
---|---|
void |
add(int i,
E e)
Inserts an element e to be at index i, shifting all elements after this. |
E |
get(int i)
Returns the element at index i, without removing it. |
boolean |
isEmpty()
Returns whether the list is empty. |
E |
remove(int i)
Removes and returns the element at index i, shifting the elements after this. |
E |
set(int i,
E e)
Replaces the element at index i with e, returning the previous element at i. |
int |
size()
Returns the number of elements in this list. |
Method Detail |
---|
int size()
boolean isEmpty()
void add(int i, E e) throws java.lang.IndexOutOfBoundsException
java.lang.IndexOutOfBoundsException
E get(int i) throws java.lang.IndexOutOfBoundsException
java.lang.IndexOutOfBoundsException
E remove(int i) throws java.lang.IndexOutOfBoundsException
java.lang.IndexOutOfBoundsException
E set(int i, E e) throws java.lang.IndexOutOfBoundsException
java.lang.IndexOutOfBoundsException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |