public class Stack<E> extends Object
| Constructor and Description |
|---|
Stack() |
| Modifier and Type | Method and Description |
|---|---|
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.
|
public void push(E ele)
ele - public E pop()
public E peek()
public E get(int index)
index - index.public E set(int index, E value)
index - index.value - element.public E remove(int index)
index - public int size()
public boolean isEmpty()
public void clear()
Copyright © 2011–2022 The Apache Software Foundation. All rights reserved.