|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This interface defines the operations supported by a "Mill".
Method Summary | |
void |
addConstants(Lookupable table)
MUTATING method to add a table of constants. |
int |
getAdy(java.lang.String operator)
This method returns the number of presentables needed to be popped off the stack for an operation. |
AlphabeticalMap |
getOperations()
Method to get a map which represents the supported functions of this Mill. |
void |
help(java.io.PrintStream output)
This method outputs help information listing and describing the various operations supported by the mill. |
java.lang.String |
lookupOperator(java.lang.String description)
This method returns the name of an operator whose description matches the string description in some way. |
void |
operate(java.lang.String operator)
Mutating method to apply the operation operator to the stack. |
java.lang.Object |
pop()
Mutating method to remove an operand from the top of the Mill stack. |
void |
push(Presentable operand)
Mutating method to push operand onto the top of the Mill stack. |
void |
setValue(java.lang.String name,
Presentable value)
Method to set a value which can later be retrieved using the name given (using the method defined by the Lookupable interface). |
int |
size()
Get the current depth of the stack. |
Methods inherited from interface com.rubecula.util.Auditable |
audit, audit, audit |
Methods inherited from interface com.rubecula.util.Identifiable |
getIdentifier |
Methods inherited from interface com.rubecula.util.Lookupable |
getKeys, getValue |
Method Detail |
public java.lang.Object pop() throws java.util.EmptyStackException
java.util.EmptyStackException
public void push(Presentable operand) throws MillException
operand
- a presentable object which will displace the former top
of the stack to the second position and itself become the top object.
MillException
public void operate(java.lang.String operator) throws java.util.EmptyStackException, MillException
operator
- the name for the operation. Different Mills will naturally
support different operations.
java.util.EmptyStackException
MillException
public int size()
public void setValue(java.lang.String name, Presentable value) throws MillException
name
- the name or key by which this value can be retrieved.value
- a Presentable value which is lookupable.
MillException
- if memory slot name cannot be set to value,
because the name is already in use (or an attempt to remove a constant).public AlphabeticalMap getOperations()
public int getAdy(java.lang.String operator) throws MillException
operator
- the name (abbreviation) of the operator.
MillException
- operator is not supported.public java.lang.String lookupOperator(java.lang.String description) throws MillException
description
- the mathematical name or description of the operator.
MillException
- more than one operator matched.public void help(java.io.PrintStream output)
output
- an output stream.public void addConstants(Lookupable table)
table
- the set of constants to be added.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |