org.unlaxer.sample.calc.CalculateContext Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of calculator Show documentation
Show all versions of calculator Show documentation
a simple parser combinator inspired by RelaxNG
package org.unlaxer.sample.calc;
import java.math.RoundingMode;
public class CalculateContext{
public enum Angle{
RADIAN,DEGREE
}
public final int scale;
public final RoundingMode roundingMode;
public final Angle angle;
public CalculateContext(int scale, RoundingMode roundingMode , Angle angle) {
super();
this.scale = scale;
this.roundingMode = roundingMode;
this.angle = angle;
}
public CalculateContext() {
this(10,RoundingMode.HALF_UP , Angle.DEGREE);
}
}