| 
 | Search this API | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objecty.util.BoundedStack
public class BoundedStack
This class represents an efficient stack of bounded size.
| Constructor Summary | |
|---|---|
| BoundedStack(int capacity)Creates a new instance of BoundedStack. | |
| Method Summary | |
|---|---|
|  int | capacity()Returns the maximal number of elements that this stack can hold. | 
|  void | clear()Removes all elements from this stack; | 
|  boolean | isEmpty()Returns true if this stack is empty. | 
|  java.lang.Object | pop()Returns the element that has been pushed last on this stack and removes it from this stack. | 
|  void | push(java.lang.Object o)Pushes a new element on this stack. | 
|  int | size()Returns the number of elements in this stack. | 
|  java.lang.Object | top()Returns the element that has been pushed last on this stack. | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
|---|
public BoundedStack(int capacity)
capacity - the maximum capacity of this queue.| Method Detail | 
|---|
public java.lang.Object top()
!isEmpty()public java.lang.Object pop()
!isEmpty()public void push(java.lang.Object o)
public void clear()
public int size()
public int capacity()
public boolean isEmpty()
| 
 | © Copyright 2000-2025, yWorks GmbH. All rights reserved. | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||