|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface SimpleList<AnyType>
An interface for simple lists that includes an Iterator.
All of these operations except remove
should run in O(1) time.
Make !NO! changes to this file!
Method Summary | |
---|---|
boolean |
add(AnyType value)
Inserts an element at the end of the list. |
boolean |
isEmpty()
Determines whether the list is empty. |
boolean |
remove(AnyType value)
Removes the first element of the list that equals value. |
Methods inherited from interface java.lang.Iterable |
---|
iterator |
Method Detail |
---|
boolean isEmpty()
true
if the list is empty; false
otherwiseboolean add(AnyType value)
value
- the element to be inserted into the list
true
if the element was added; false
otherwiseboolean remove(AnyType value)
value
- the element to remove
true
if the element was removed; false
otherwise
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |