|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.parboiled.support.DefaultValueStack<V>
org.parboiled.support.DebuggingValueStack<V>
public class DebuggingValueStack<V>
Field Summary | |
---|---|
Sink<java.lang.String> |
log
|
Constructor Summary | |
---|---|
DebuggingValueStack()
|
|
DebuggingValueStack(java.lang.Iterable<V> values)
|
|
DebuggingValueStack(java.lang.Iterable<V> values,
Sink<java.lang.String> log)
|
|
DebuggingValueStack(Sink<java.lang.String> log)
|
Method Summary | |
---|---|
void |
clear()
Clears all values. |
void |
poke(int down,
V value)
Replaces the element the given number of elements below the current top of the stack. |
V |
pop(int down)
Removes the value the given number of elements below the top of the stack. |
void |
push(int down,
V value)
Inserts the given value a given number of elements below the current top of the stack. |
void |
push(V value)
Pushes the given value onto the stack. |
void |
restoreSnapshot(java.lang.Object snapshot)
Restores the stack state as previously returned by ValueStack.takeSnapshot() . |
void |
swap()
Swaps the top two stack values. |
void |
swap3()
Reverses the order of the top 3 stack values. |
void |
swap4()
Reverses the order of the top 4 stack values. |
void |
swap5()
Reverses the order of the top 5 stack values. |
void |
swap6()
Reverses the order of the top 5 stack values. |
Methods inherited from class org.parboiled.support.DefaultValueStack |
---|
dup, isEmpty, iterator, peek, peek, poke, pop, pushAll, pushAll, size, takeSnapshot |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public final Sink<java.lang.String> log
Constructor Detail |
---|
public DebuggingValueStack()
public DebuggingValueStack(Sink<java.lang.String> log)
public DebuggingValueStack(java.lang.Iterable<V> values)
public DebuggingValueStack(java.lang.Iterable<V> values, Sink<java.lang.String> log)
Method Detail |
---|
public void clear()
ValueStack
clear
in interface ValueStack<V>
clear
in class DefaultValueStack<V>
public void restoreSnapshot(java.lang.Object snapshot)
ValueStack
ValueStack.takeSnapshot()
.
This cost of running this operation is negligible and independent from the size of the stack.
restoreSnapshot
in interface ValueStack<V>
restoreSnapshot
in class DefaultValueStack<V>
snapshot
- a snapshot object previously returned by ValueStack.takeSnapshot()
public void push(V value)
ValueStack
push
in interface ValueStack<V>
push
in class DefaultValueStack<V>
value
- the valuepublic void push(int down, V value)
ValueStack
push
in interface ValueStack<V>
push
in class DefaultValueStack<V>
down
- the number of elements to skip before inserting the value (0 being equivalent to push(value))value
- the valuepublic V pop(int down)
ValueStack
pop
in interface ValueStack<V>
pop
in class DefaultValueStack<V>
down
- the number of elements to skip before removing the value (0 being equivalent to pop())
public void poke(int down, V value)
ValueStack
poke
in interface ValueStack<V>
poke
in class DefaultValueStack<V>
down
- the number of elements to skip before replacing the value (0 being equivalent to poke(value))value
- the value to replace withpublic void swap()
ValueStack
swap
in interface ValueStack<V>
swap
in class DefaultValueStack<V>
public void swap3()
ValueStack
swap3
in interface ValueStack<V>
swap3
in class DefaultValueStack<V>
public void swap4()
ValueStack
swap4
in interface ValueStack<V>
swap4
in class DefaultValueStack<V>
public void swap5()
ValueStack
swap5
in interface ValueStack<V>
swap5
in class DefaultValueStack<V>
public void swap6()
ValueStack
swap6
in interface ValueStack<V>
swap6
in class DefaultValueStack<V>
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |