public class SingleLinkedList<T> extends Object
Modifier and Type | Class and Description |
---|---|
protected static class |
SingleLinkedList.Node<T>
The list is composed of nodes.
|
Constructor and Description |
---|
SingleLinkedList() |
Modifier and Type | Method and Description |
---|---|
void |
addLast(T payload)
Adds an item to the end of the list.
|
void |
clear()
Removes everything.
|
int |
size()
Returns the number of elements in the list.
|
T |
takeFirst()
Takes the first item off the list.
|
public T takeFirst()
public void addLast(T payload)
payload
- public void clear()
public int size()
Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.