|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectArStack
public class ArStack
realizza l'interfaccia Stack usando internamente un array riempito parzialmente.
Constructor Summary | |
---|---|
ArStack()
|
Method Summary | |
---|---|
boolean |
isEmpty()
O(1) |
void |
makeEmpty()
O(1) |
java.lang.Object |
pop()
O(1) |
void |
push(java.lang.Object obj)
in media O(1) |
int |
size()
O(1) |
java.lang.Object |
top()
O(1) |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ArStack()
Method Detail |
---|
public boolean isEmpty()
isEmpty
in interface Container
public void makeEmpty()
makeEmpty
in interface Container
public int size()
size
in interface Container
public void push(java.lang.Object obj)
push
in interface Stack
obj
- oggetto da inserirepublic java.lang.Object top() throws EmptyStackException
top
in interface Stack
EmptyStackException
public java.lang.Object pop() throws EmptyStackException
pop
in interface Stack
EmptyStackException
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |