public class MathResolver extends Object
GroupingExpression
objects. To resolve an
operation simply push operator-expression pairs onto it, before calling resolve()
to retrieve the single
corresponding grouping expression object.Modifier and Type | Class and Description |
---|---|
static class |
MathResolver.Type |
Constructor and Description |
---|
MathResolver() |
Modifier and Type | Method and Description |
---|---|
void |
push(MathResolver.Type type,
GroupingExpression exp)
Pushes the given operator-expression pair onto this math resolver.
|
GroupingExpression |
resolve()
Converts the internal list of operator-expression pairs into a corresponding combined grouping expression.
|
String |
toString() |
public void push(MathResolver.Type type, GroupingExpression exp)
resolve()
to retrieve to combined grouping expression.type
- The operator that appears before the expression being pushed.exp
- The expression to push.public GroupingExpression resolve()
Copyright © 2018. All rights reserved.