Class MUnaryPostOperator
java.lang.Object
com.github.gbenroscience.parser.Operator
com.github.gbenroscience.math.matrix.expressParser.MOperator
com.github.gbenroscience.math.matrix.expressParser.MUnaryPostOperator
- All Implemented Interfaces:
Validatable
Models a post-operand MOperator
object e.g the !, inverse, square, cube operators
- Author:
- GBEMIRO
-
Field Summary
Fields inherited from class com.github.gbenroscience.math.matrix.expressParser.MOperator
COL_JOIN, DET, DET_BRACE, INV, operators, ROW_JOIN, TRI_MATRIX, UNITFields inherited from class com.github.gbenroscience.parser.Operator
AND, ASSIGN, AT, CLOSE_CIRC_BRAC, CLOSE_SQUARE_BRAC, COLON, COMBINATION, COMMA, CONST, CUBE, CUBE_ROOT, DIVIDE, EN_DASH, EQUALS, EXIT, FACTORIAL, GREATER_OR_EQUALS, GREATER_THAN, INVERSE, LESS_OR_EQUALS, LESS_THAN, MINUS, MULTIPLY, name, OPEN_CIRC_BRAC, OPEN_SQUARE_BRAC, OR, PERMUTATION, PLUS, POWER, REMAINDER, ROOT, SEMI_COLON, SPACE, SQUARE, STORE -
Constructor Summary
ConstructorsConstructorDescriptionMUnaryPostOperator(String name, int index, ArrayList<String> scan) Creates a new MUnaryPostOperator object -
Method Summary
Modifier and TypeMethodDescriptionstatic voidassignCompoundTokens(ArrayList<String> scan) Carefully interpretes the correct arrangement of a loose math statement for objects of this class and applies the correct one to the Function object.booleanMethods inherited from class com.github.gbenroscience.math.matrix.expressParser.MOperator
getName, getPrecedence, isAssignmentOperator, isBinaryOperator, isBracket, isClosingBrace, isClosingBracket, isColJoin, isColon, isCube, isDet, isDetHalfSymbol, isInverse, isMul, isOpeningBrace, isOpeningBracket, isOperatorString, isPlusOrMinus, isPower, isRowJoin, isSquare, isTri, isUnaryPostOperator, isUnaryPreOperator, isUnit, setName, validateAllMethods inherited from class com.github.gbenroscience.parser.Operator
isAtOperator, isComma, isConstantStoreCommand, isCubeRoot, isEqualsOperator, isExitCommand, isFactorial, isGreaterOrEqualsOperator, isGreaterThanOperator, isLessThanOperator, isLessThanOrEqualsOperator, isLogicOperator, isMulOrDiv, isMulOrDivOrRemOrPermOrCombOrPow, isPermOrComb, isRemainder, isSemiColon, isSquareRoot, isStoreCommand, validateAll
-
Constructor Details
-
MUnaryPostOperator
-
-
Method Details
-
getPrecedence
- Returns:
- the Precedence of this MOperator object.
-
validate
- Specified by:
validatein interfaceValidatable- Parameters:
scan- The scanner output that this MUnaryPostOperator object exists in. validates the grammatical usage of this operator (by leaving the correctFunction attribute of the function object un-modified) if the usage of this operator in its immediate environment i.e to its left and right is correct.- Returns:
- true if the grammatical usage of this token with repect to its 2 immediate neighbouring tokens to the left and to the right is correct.
-
assignCompoundTokens
Carefully interpretes the correct arrangement of a loose math statement for objects of this class and applies the correct one to the Function object.- Parameters:
scan- The ArrayList object that is the scanner of the Function object and so contains this MUnaryPostOperator object
-