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

org.unlaxer.sample.calc.CalculateResult Maven / Gradle / Ivy

There is a newer version: 1.1.26
Show newest version
package org.unlaxer.sample.calc;

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 token;
	public final Optional answer;
	public final ParseContext parseContext;
	public final Errors errors;
	public CalculateResult(ParseContext parseContext , Parsed parsed, Optional answer , Errors errors) {
		super();
		this.parseContext = parseContext;
		this.token = parsed.getTokenOptional();
		this.success = parsed.isSucceeded();
		this.answer = answer;
		this.errors = errors;
	}
	
	public CalculateResult(ParseContext parseContext , Parsed parsed, Optional answer) {
		this(parseContext, parsed, answer, new Errors());
	}
	
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy