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

org.unlaxer.sample.calc.parser.operator.ImmediateValueOperator Maven / Gradle / Ivy

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

import java.math.BigDecimal;
import java.util.function.Supplier;

import org.unlaxer.Token;
import org.unlaxer.sample.calc.CalculationContext;

public class ImmediateValueOperator implements UnaryOperator> {
	
	public static final ImmediateValueOperator SINGLETON = new ImmediateValueOperator();

	@Override
	public Supplier evaluate(CalculationContext calculationContext , Token token) {
		
		return ()->new BigDecimal(token.tokenString.get());
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy