-
-
Constructor Summary
Constructors
| Constructor and Description |
Stack() |
-
Method Summary
Methods
| 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.
|
-
-
Method Detail
-
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.
-
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.
Copyright © 2011–2018 The Dubbo Project. All rights reserved.