Interface SimpleList<E>
-
- All Known Implementing Classes:
LinkedListKeyTypeConverterService
,LinkedListObjectFactoryService
,LinkedListValueTypeConverterService
,SimpleLinkedList
public interface SimpleList<E>
A list that is easier to implement thanList
.- Author:
- Carl Harris
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
append(E element)
Appends the given element to the end of the collection.void
prepend(E element)
Inserts the given element such that it becomes the first element in the collection.boolean
remove(E element)
Removes the given element from the collection.List<E>
toList()
Coerces this list into aList
.
-
-
-
Method Detail
-
append
void append(E element)
Appends the given element to the end of the collection.- Parameters:
element
- the element to append
-
prepend
void prepend(E element)
Inserts the given element such that it becomes the first element in the collection.- Parameters:
element
- the element to insert
-
remove
boolean remove(E element)
Removes the given element from the collection.Any existing element identical to
element
is removed- Parameters:
element
- the element to remove- Returns:
true
if a element was removed
-
-