mirror of
https://github.com/DanilaFe/abacus
synced 2024-12-22 07:20:09 -08:00
Add the operator that had been in use by Plugin and PluginManager.
This commit is contained in:
parent
077a34c618
commit
ee1de6dc17
27
src/org/nwapw/abacus/function/Operator.java
Normal file
27
src/org/nwapw/abacus/function/Operator.java
Normal file
|
@ -0,0 +1,27 @@
|
|||
package org.nwapw.abacus.function;
|
||||
|
||||
public abstract class Operator {
|
||||
|
||||
private OperatorAssociativity associativity;
|
||||
private int precedence;
|
||||
private Function function;
|
||||
|
||||
public Operator(OperatorAssociativity associativity, int precedence, Function function){
|
||||
this.associativity = associativity;
|
||||
this.precedence = precedence;
|
||||
this.function = function;
|
||||
}
|
||||
|
||||
public OperatorAssociativity getAssociativity() {
|
||||
return associativity;
|
||||
}
|
||||
|
||||
public int getPrecedence() {
|
||||
return precedence;
|
||||
}
|
||||
|
||||
public Function getFunction() {
|
||||
return function;
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user