All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.unlaxer.tinyexpression.CalculateResult_ Maven / Gradle / Ivy

There is a newer version: 1.4.4
Show 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);
  }
  
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy