org.unlaxer.tinyexpression.CalculateResult_ Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of tinyExpression Show documentation
Show all versions of tinyExpression Show documentation
TinyExpression implemented with Unlaxer
The newest version!
package org.unlaxer.tinyexpression;
import java.math.BigDecimal;
import java.util.Optional;
import org.unlaxer.Parsed;
import org.unlaxer.Token;
import org.unlaxer.context.ParseContext;
public class CalculateResult_{
public final boolean success;
public final Optional operatorOperandTreeToken;
public final Optional tokenAst;
public final Optional answer;
public final ParseContext parseContext;
public final Errors errors;
public CalculateResult_(ParseContext parseContext , Parsed parsed, Optional answer , Errors errors , Token operatorOperandTreeToken) {
super();
this.parseContext = parseContext;
this.tokenAst = parsed.getTokenOptional();
this.success = parsed.isSucceeded();
this.answer = answer;
this.errors = errors;
this.operatorOperandTreeToken = Optional.ofNullable(operatorOperandTreeToken);
}
public CalculateResult_(ParseContext parseContext , Parsed parsed, Optional answer, Token operatorOperandTreeToken) {
this(parseContext, parsed, answer, new Errors() , operatorOperandTreeToken);
}
}