java.lang.Objectunit4.collectionsLib.Stack<T>
public class Stack<T>
Constructor Summary | |
---|---|
Stack()
|
Method Summary | |
---|---|
boolean |
isEmpty()
|
T |
pop()
הנחה: המחסנית הנוכחית לא ריקה |
void |
push(T x)
|
T |
top()
הנחה: המחסנית הנוכחית לא ריקה |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Stack()
Method Detail |
---|
public boolean isEmpty()
public void push(T x)
x
- ערך להכנסה לראש המחסניתpublic T pop()
public T top()
public String toString()
toString
in class java.lang.Object