| Modifier and Type | Class and Description |
|---|---|
| public static interface | |
| private class | _Private_RecyclingQueue.
Iterator for the queue. |
| public static interface |
| Modifier and Type | Field and Description |
|---|---|
| private int | |
| private final _Private_RecyclingQueue. | |
| private final List | |
| private final _Private_RecyclingQueue | |
| private T |
| Access | Constructor and Description |
|---|---|
| public | _Private_RecyclingQueue(int
the initial capacity of the underlying collection. initialCapacity, _Private_RecyclingQueue.the factory used to create a new element on elementFactorypush() when the queue has
not previously grown to the new depth.
|
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public T | |
| public boolean | |
| public Iterator | |
| public int | Returns: the element at the top of the queue after the push. This element must be initialized by the caller.Pushes an element onto the top of the queue, instantiating a new element only if the queue has not previously grown to the new depth. |
| public void | |
| public int | |
| public void |
| currentIndex | back to summary |
|---|---|
| private int currentIndex | |
| elementFactory | back to summary |
|---|---|
| private final _Private_RecyclingQueue. | |
| elements | back to summary |
|---|---|
| private final List<T> elements | |
| iterator | back to summary |
|---|---|
| private final _Private_RecyclingQueue<T>. | |
| top | back to summary |
|---|---|
| private T top | |
| _Private_RecyclingQueue | back to summary |
|---|---|
public _Private_RecyclingQueue(int initialCapacity, _Private_RecyclingQueue.
| |
| clear | back to summary |
|---|---|
| public void clear() Reset the index and make the queue reusable. | |
| get | back to summary |
|---|---|
| public T get(int index) | |
| isEmpty | back to summary |
|---|---|
public boolean isEmpty()
| |
| iterate | back to summary |
|---|---|
| public Iterator | |
| push | back to summary |
|---|---|
| public int push(_Private_RecyclingQueue. Pushes an element onto the top of the queue, instantiating a new element only if the queue has not previously grown to the new depth.
| |
| remove | back to summary |
|---|---|
| public void remove() Reclaim the current element. | |
| size | back to summary |
|---|---|
public int size()
| |
| truncate | back to summary |
|---|---|
| public void truncate(int index) | |
| Modifier and Type | Method and Description |
|---|---|
| public T |
| newElement | back to summary |
|---|---|
public T newElement()
| |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv int |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | |
| public T |
| i | back to summary |
|---|---|
| pack-priv int i | |
| ElementIterator | back to summary |
|---|---|
| private ElementIterator() | |
| hasNext | back to summary |
|---|---|
| public boolean hasNext() Implements java. Doc from java. Returns
| |
| next | back to summary |
|---|---|
| public T next() Implements java. Doc from java. Returns the next element in the iteration.
| |
| Modifier and Type | Method and Description |
|---|---|
| public void |
| recycle | back to summary |
|---|---|
| public void recycle(T t) Re-initialize an element | |