|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.nebula.widgets.oscilloscope.Oscilloscope.IntegerFiFoCircularStack
public class Oscilloscope.IntegerFiFoCircularStack
The stack will not overflow if you push too many values into it but it will rotate and overwrite the older values. Think of the stack as a closed ring with one hole to push values in and one that lets them out.
Constructor Summary | |
---|---|
Oscilloscope.IntegerFiFoCircularStack(int capacity)
Creates a stack with the indicated capacity. |
|
Oscilloscope.IntegerFiFoCircularStack(int capacity,
Oscilloscope.IntegerFiFoCircularStack oldStack)
Creates stack with the indicated capacity and copies the old stack into the new stack. |
Method Summary | |
---|---|
void |
clear()
Clears the stack. |
boolean |
isEmpty()
|
int |
pop(int valueIfEmpty)
Returns the oldest value from the stack. |
void |
push(int value)
Puts a value on the stack. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Oscilloscope.IntegerFiFoCircularStack(int capacity)
capacity
- public Oscilloscope.IntegerFiFoCircularStack(int capacity, Oscilloscope.IntegerFiFoCircularStack oldStack)
capacity
- oldStack
- Method Detail |
---|
public void clear()
public void push(int value)
value
- public int pop(int valueIfEmpty)
valueIfEmpty
-
public boolean isEmpty()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |