|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.foray.ps.PsStack<PsObject>
org.foray.ps.PsOperandStack
public class PsOperandStack
A PostScript Operand stack.
Field Summary |
---|
Fields inherited from class org.foray.ps.PsStack |
---|
DEFAULT_STACK_SIZE |
Method Summary | |
---|---|
protected PsObject |
filterPush(PsObject objectToPush)
A hook for subclasses to filter the content of items being pushed onto the stack. |
int |
getMinimumStackSize()
Returns the minumum size that this stack can be. |
PsError |
getUnderflowError()
Returns the appropriate PS error that should be used for an underflow condition in this stack. |
protected void |
roll(int n,
int j,
PsOperator operatorCode)
Rolls the stack n elements deep, j positions. |
Methods inherited from class org.foray.ps.PsStack |
---|
getInterpreter, getList, peek, peek, pop, pop, size |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public int getMinimumStackSize()
PsStack
getMinimumStackSize
in class PsStack<PsObject>
public PsError getUnderflowError()
PsStack
getUnderflowError
in class PsStack<PsObject>
protected void roll(int n, int j, PsOperator operatorCode) throws PsInterpreterException4a
n
- The depth, or number of stack items to be rolled.j
- The distance and direction that the roll should occur,
positive indicating elements should be rolled up toward the top of the
stack, negetive indicating elements should be rolled down toward the
bottom of the stack.operatorCode
- The PS operator code requesting the roll.
This is used in user messages.
PsInterpreterException4a
- For PS stackunderflow errors.protected PsObject filterPush(PsObject objectToPush)
PsStack
filterPush
in class PsStack<PsObject>
objectToPush
- The nominal object being pushed onto the stack.
objectToPush
, but is not required to be so.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |