|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectstack.StackStatico<E>
public class StackStatico<E>
| Constructor Summary | |
|---|---|
StackStatico()
Creates an empty Stack of max 10 ints. |
|
StackStatico(int n)
Creates an empty Stack of max N ints. |
|
| Method Summary | |
|---|---|
boolean |
empty()
Tests if this stack is empty. |
int |
howMany()
Returns the number of elements inside the Stack. |
E |
peek()
Looks at the object at the top of this stack without removing it from the stack. |
E |
pop()
Removes the object at the top of this stack and returns that object as the value of this function. |
E |
push(E item)
Pushes an item onto the top of this stack. |
int |
search(E o)
Returns the 1-based position where an object is on this stack. |
java.lang.String |
toString()
Return a String representation of the Stack and its content. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public StackStatico()
public StackStatico(int n)
| Method Detail |
|---|
public boolean empty()
empty in interface Stack<E>public E peek()
peek in interface Stack<E>public E pop()
pop in interface Stack<E>public E push(E item)
push in interface Stack<E>public int search(E o)
search in interface Stack<E>public int howMany()
howMany in interface Stack<E>public java.lang.String toString()
toString in class java.lang.Object
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||