|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
E
- public interface ILinkedList<E>
Provides basic functionalities of a generic linked-list
Nested Class Summary | |
---|---|
static class |
ILinkedList.OrderIndexOutOfBoundsException
throw this exception when an invalid index is used (like ArrayIndexOutOfBoundsException) |
Method Summary | |
---|---|
E |
get(int indx)
Get the item at index indx |
void |
insert(E item,
int indx)
Insert an item into index indx |
void |
insertHead(E item)
Insert item to the head of the list |
void |
insertTail(E item)
Insert item to the end of the list |
boolean |
isEmpty()
determines if the list is empty or not |
E |
remove(int indx)
Remove an item from the list |
int |
size()
|
Method Detail |
---|
void insertHead(E item)
item
- void insertTail(E item)
item
- void insert(E item, int indx) throws ILinkedList.OrderIndexOutOfBoundsException
item:
- item of type E to be insertedindx:
- index in the list to be inserted
ILinkedList.OrderIndexOutOfBoundsException
E remove(int indx) throws ILinkedList.OrderIndexOutOfBoundsException
indx:
- index of the item need to be removed.
ILinkedList.OrderIndexOutOfBoundsException
E get(int indx) throws ILinkedList.OrderIndexOutOfBoundsException
indx:
- index in the list to get the item
ILinkedList.OrderIndexOutOfBoundsException
int size()
boolean isEmpty()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |