Package org.unitConverter.math
Class ExpressionParser.PriorityUnaryOperator<T>
- java.lang.Object
-
- org.unitConverter.math.ExpressionParser.PriorityUnaryOperator<T>
-
- Type Parameters:
T
- type of operand and result
- All Implemented Interfaces:
java.lang.Comparable<ExpressionParser.PriorityUnaryOperator<T>>
,java.util.function.Function<T,T>
,java.util.function.UnaryOperator<T>
- Enclosing class:
- ExpressionParser<T>
private abstract static class ExpressionParser.PriorityUnaryOperator<T> extends java.lang.Object implements java.util.function.UnaryOperator<T>, java.lang.Comparable<ExpressionParser.PriorityUnaryOperator<T>>
A unary operator with a priority field that determines which operators apply first.- Since:
- 2019-03-17, v0.2.0
- Author:
- Adrien Hopkins
-
-
Field Summary
Fields Modifier and Type Field Description private int
priority
The operator's priority.
-
Constructor Summary
Constructors Constructor Description PriorityUnaryOperator(int priority)
Creates thePriorityUnaryOperator
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareTo(ExpressionParser.PriorityUnaryOperator<T> o)
Compares this object to another by priority.int
getPriority()
-
-
-
Method Detail
-
compareTo
public int compareTo(ExpressionParser.PriorityUnaryOperator<T> o)
Compares this object to another by priority.- Specified by:
compareTo
in interfacejava.lang.Comparable<T>
- Since:
- 2019-03-17, v0.2.0
-
getPriority
public final int getPriority()
- Returns:
- priority
- Since:
- 2019-03-22, v0.2.0
-
-