public class SimpleStack<T> extends AbstractLinkedList<T,xapi.collect.impl.SimpleStack.StackNode<T>,SimpleStack<T>>
It's one-way, threadsafe, fast, toString friendly, and can merge with other
SimpleStacks easily via #consume(SimpleStack)
Note that neither remove() nor size() are not supported.
If you need a list or a map, use one. This class is for pushing together references, iterating through them, and maybe joining them into a string.
AbstractLinkedList.Node<T,N extends AbstractLinkedList.Node<T,N>>, AbstractLinkedList.NodeIterator| Constructor and Description |
|---|
SimpleStack() |
| Modifier and Type | Method and Description |
|---|---|
protected xapi.collect.impl.SimpleStack.StackNode<T> |
newNode(T item)
Called whenever a node is created, including the
AbstractLinkedList.head node. |
add, clear, consume, head, isEmpty, iterator, join, onAdd, tail, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitforEach, spliteratorprotected xapi.collect.impl.SimpleStack.StackNode<T> newNode(T item)
AbstractLinkedListAbstractLinkedList.head node.newNode in class AbstractLinkedList<T,xapi.collect.impl.SimpleStack.StackNode<T>,SimpleStack<T>>item - -> The item that will become the value for this node. Expect a
null for the head node.Copyright © December 07, 2012–2015 The Internet Party. All rights reserved.