类 Stack<E>


  • public class Stack<E>
    extends 
    Stack.
    • 构造器概要

      构造器 
      构造器 说明
      Stack()  
    • 方法概要

      所有方法 实例方法 具体方法 
      修饰符和类型 方法 说明
      void clear()
      clear stack.
      E get​(int index)
      get.
      boolean isEmpty()
      is empty.
      E peek()
      peek.
      E pop()
      pop.
      void push​(E ele)
      push.
      E remove​(int index)
      remove.
      E set​(int index, E value)
      set.
      int size()
      get stack size.
      • 从类继承的方法 java.lang.

        , , , , , , , ,
    • 构造器详细资料

      • Stack

        public Stack()
    • 方法详细资料

      • push

        public void push​(E ele)
        push.
        参数:
        ele -
      • pop

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

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

        public E get​(int index)
        get.
        参数:
        index - index.
        返回:
        element.
      • set

        public E set​(int index,
                     E value)
        set.
        参数:
        index - index.
        value - element.
        返回:
        old element.
      • remove

        public E remove​(int index)
        remove.
        参数:
        index -
        返回:
        element
      • size

        public int size()
        get stack size.
        返回:
        size.
      • isEmpty

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

        public void clear()
        clear stack.