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

com.codetaco.algebrain.token.TokOperand Maven / Gradle / Ivy

The newest version!
package com.codetaco.algebrain.token;

import com.codetaco.algebrain.EquPart;
import com.codetaco.algebrain.Function;
import com.codetaco.algebrain.ValueStack;
import com.codetaco.algebrain.operator.OpLeftParen;

/**
 * 

* Abstract TokOperand class. *

* * @author Chris DeGreef [email protected] * @since 1.3.9 */ public abstract class TokOperand extends Token { /** *

* Constructor for TokOperand. *

*/ public TokOperand() { super(); } /** {@inheritDoc} */ @Override public boolean multiplize(final EquPart rightSide) { return (rightSide instanceof OpLeftParen || rightSide instanceof TokOperand || rightSide instanceof Function); } /** {@inheritDoc} */ @Override public void resolve(final ValueStack values) throws Exception { values.push(getValue()); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy