| Modifier and Type | Class and Description |
|---|---|
| private class | |
| public static interface | |
| public static interface |
| Modifier and Type | Field and Description |
|---|---|
| private int | |
| private final _Private_RecyclingStack. | |
| private final List | |
| public _Private_RecyclingStack | |
| private T |
| Access | Constructor and Description |
|---|---|
| public | _Private_RecyclingStack(int
the initial capacity of the underlying collection. initialCapacity, _Private_RecyclingStack.the factory used to create a new element on elementFactorypush(Recycler) when the stack has
not previously grown to the new depth.
|
| Modifier and Type | Method and Description |
|---|---|
| public boolean | |
| public ListIterator | |
| public T | |
| public T | Returns: the element that was at the top of the stack before the pop, or null if the stack was empty.Pops an element from the stack, retaining a reference to the element so that it can be reused the next time the stack grows to the element's depth. |
| public T | Returns: the element at the top of the stack after the push. This element must be initialized by the caller.Pushes an element onto the top of the stack, instantiating a new element only if the stack has not previously grown to the new depth. |
| public int |
| currentIndex | back to summary |
|---|---|
| private int currentIndex | |
| elementFactory | back to summary |
|---|---|
| private final _Private_RecyclingStack. | |
| elements | back to summary |
|---|---|
| private final List<T> elements | |
| stackIterator | back to summary |
|---|---|
| public _Private_RecyclingStack<T>. | |
| top | back to summary |
|---|---|
| private T top | |
| _Private_RecyclingStack | back to summary |
|---|---|
public _Private_RecyclingStack(int initialCapacity, _Private_RecyclingStack.
| |
| isEmpty | back to summary |
|---|---|
public boolean isEmpty()
| |
| iterator | back to summary |
|---|---|
| public ListIterator Implements java. Doc from java. Returns an iterator over elements of type
| |
| peek | back to summary |
|---|---|
public T peek()
| |
| pop | back to summary |
|---|---|
| public T pop() Pops an element from the stack, retaining a reference to the element so that it can be reused the next time the stack grows to the element's depth.
| |
| push | back to summary |
|---|---|
| public T push(_Private_RecyclingStack. Pushes an element onto the top of the stack, instantiating a new element only if the stack has not previously grown to the new depth.
| |
| size | back to summary |
|---|---|
public int size()
| |
| Modifier and Type | Field and Description |
|---|---|
| private int |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public void | add(T
the element to insert t)Implements java. Inserts the specified element into the list (optional operation). |
| public boolean | hasNext()
Implements java. Returns |
| public boolean | hasPrevious()
Implements java. Returns |
| public T | next()
Implements java. Returns the next element in the list and advances the cursor position. |
| public int | nextIndex()
Implements java. Returns the index of the element that would be returned by a
subsequent call to |
| public T | previous()
Implements java. Returns the previous element in the list and moves the cursor position backwards. |
| public int | previousIndex()
Implements java. Returns the index of the element that would be returned by a
subsequent call to |
| public void | remove()
Implements java. Removes from the list the last element that was returned by |
| public void | set(T
the element with which to replace the last element returned by
t)next or previousImplements java. Replaces the last element returned by |
| cursor | back to summary |
|---|---|
| private int cursor | |
| $Iterator | back to summary |
|---|---|
| private $Iterator() | |
| add | back to summary |
|---|---|
| public void add(T t) Implements java. Doc from java. Inserts the specified element into the list (optional operation).
The element is inserted immediately before the element that
would be returned by
| |
| hasNext | back to summary |
|---|---|
| public boolean hasNext() Implements java. Doc from java. Returns
| |
| hasPrevious | back to summary |
|---|---|
| public boolean hasPrevious() Implements java. Doc from java. Returns
| |
| next | back to summary |
|---|---|
| public T next() Implements java. Doc from java. Returns the next element in the list and advances the cursor position.
This method may be called repeatedly to iterate through the list,
or intermixed with calls to
| |
| nextIndex | back to summary |
|---|---|
| public int nextIndex() Implements java. Doc from java. Returns the index of the element that would be returned by a
subsequent call to
| |
| previous | back to summary |
|---|---|
| public T previous() Implements java. Doc from java. Returns the previous element in the list and moves the cursor
position backwards. This method may be called repeatedly to
iterate through the list backwards, or intermixed with calls to
| |
| previousIndex | back to summary |
|---|---|
| public int previousIndex() Implements java. Doc from java. Returns the index of the element that would be returned by a
subsequent call to
| |
| remove | back to summary |
|---|---|
| public void remove() Implements java. Doc from java. Removes from the list the last element that was returned by
| |
| set | back to summary |
|---|---|
| public void set(T t) Implements java. Doc from java. Replaces the last element returned by
| |
| Modifier and Type | Method and Description |
|---|---|
| public T |
| newElement | back to summary |
|---|---|
public T newElement()
| |
| Modifier and Type | Method and Description |
|---|---|
| public void |
| recycle | back to summary |
|---|---|
| public void recycle(T t) Re-initialize an element | |