Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.nokia.ant.listener.internaldata
Class EndLessStack<E>

    java.lang.Object
      java.util.AbstractCollection<E>
          java.util.AbstractList<E>
              java.util.Vector<E>
                  java.util.Stack<E>
                      com.nokia.ant.listener.internaldata.EndLessStack<E>

All Implemented Interfaces:
  java.io.Serializable, java.lang.Cloneable, java.lang.Iterable<E>, java.util.Collection<E>, java.util.List<E>, java.util.RandomAccess

    public class EndLessStack<E>

extends java.util.Stack<E>

See Also:
  Serialized Form

Field Summary
`static long` | `serialVersionUID`

Fields inherited from class java.util.Vector
`capacityIncrement, elementCount, elementData`

Fields inherited from class java.util.AbstractList
`modCount`

Constructor Summary
`EndLessStack()` Create a stack with a null default element.
`EndLessStack(E defaultElement)` Create a stack with a defaultElement as the default element.

Method Summary
`boolean` | `empty()` Endless stack is never empty.
`java.lang.Object` | `getDefaultElement()` Get default element.
`E` | `peek()` This return the top most element from the stack.
`E` | `pop()` This return the top most element out from the stack.
`void` | `setDefaultElement(E defaultElement)` Set default element.

Methods inherited from class java.util.Stack
`push, search`

Methods inherited from class java.util.Vector
`add, add, addAll, addAll, addElement, capacity, clear, clone, contains, containsAll, copyInto, elementAt, elements, ensureCapacity, equals, firstElement, get, hashCode, indexOf, indexOf, insertElementAt, isEmpty, lastElement, lastIndexOf, lastIndexOf, remove, remove, removeAll, removeAllElements, removeElement, removeElementAt, removeRange, retainAll, set, setElementAt, setSize, size, subList, toArray, toArray, toString, trimToSize`

Methods inherited from class java.util.AbstractList
`iterator, listIterator, listIterator`

Methods inherited from class java.lang.Object
`finalize, getClass, notify, notifyAll, wait, wait, wait`

Methods inherited from interface java.util.List
`iterator, listIterator, listIterator`

Field Detail

### serialVersionUID

    public static final long serialVersionUID

See Also:
  Constant Field Values

Constructor Detail

### EndLessStack

    public EndLessStack(E defaultElement)

  Create a stack with a defaultElement as the default element.

### EndLessStack

    public EndLessStack()

  Create a stack with a null default element.

Method Detail

### pop

    public E pop()

  This return the top most element out from the stack. If the stack is empty it returns the defaultElement.

  Overrides:
    `pop` in class `java.util.Stack<E>`
  Returns:
    element

### empty

    public boolean empty()

  Endless stack is never empty.

  Overrides:
    `empty` in class `java.util.Stack<E>`

### peek

    public E peek()

  This return the top most element from the stack. If the stack is empty it returns the defaultElement. The return element is kept in the stack.

  Overrides:
    `peek` in class `java.util.Stack<E>`
  Returns:
    element

### getDefaultElement

    public java.lang.Object getDefaultElement()

  Get default element. This is the object which will get returned if the internal stack gets empty.

  Returns:
    element

### setDefaultElement

    public void setDefaultElement(E defaultElement)

  Set default element.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD