org.bitbucket.gkutiel.booly.Op Maven / Gradle / Ivy
package org.bitbucket.gkutiel.booly;
public enum Op {
// @formatter:off
// http://en.wikipedia.org/wiki/Order_of_operations#Programming_languages
NOT(2, Reducer.NOT),
GEQ(6, Reducer.GEQ),
GT(6, Reducer.GT),
LEQ(6, Reducer.LEQ),
LT(6, Reducer.LT),
EQ(7, Reducer.EQ),
AND(11, Reducer.AND),
OR(12,Reducer.OR);
// @formatter:on
public int precedence;
public Reducer reducer;
private Op(final int precedence, final Reducer reducer) {
this.precedence = precedence;
this.reducer = reducer;
}
}