Class Stack<E>

java.lang.Object
org.apache.dubbo.common.utils.Stack<E>

public class Stack<E> extends Object
Stack.
  • Constructor Details

    • Stack

      public Stack()
  • Method Details

    • push

      public void push(E ele)
      push.
      Parameters:
      ele -
    • pop

      public E pop()
      pop.
      Returns:
      the last element.
    • peek

      public E peek()
      peek.
      Returns:
      the last element.
    • get

      public E get(int index)
      get.
      Parameters:
      index - index.
      Returns:
      element.
    • set

      public E set(int index, E value)
      set.
      Parameters:
      index - index.
      value - element.
      Returns:
      old element.
    • remove

      public E remove(int index)
      remove.
      Parameters:
      index -
      Returns:
      element
    • size

      public int size()
      get stack size.
      Returns:
      size.
    • isEmpty

      public boolean isEmpty()
      is empty.
      Returns:
      empty or not.
    • clear

      public void clear()
      clear stack.