Interface SimpleList<AnyType>

All Superinterfaces:
java.lang.Iterable<AnyType>
All Known Implementing Classes:
MyList

public interface SimpleList<AnyType>
extends java.lang.Iterable<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

isEmpty

boolean isEmpty()
Determines whether the list is empty.

Returns:
true if the list is empty; false otherwise

add

boolean add(AnyType value)
Inserts an element at the end of the list.

Parameters:
value - the element to be inserted into the list
Returns:
true if the element was added; false otherwise

remove

boolean remove(AnyType value)
Removes the first element of the list that equals value.

Parameters:
value - the element to remove
Returns:
true if the element was removed; false otherwise