Back to project page AnkiStats.
The source code is released under:
GNU General Public License
If you think the Android project AnkiStats listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.wildplot.android.parsing.AtomTypes; /*from w ww.j ava 2s.com*/ import com.wildplot.android.parsing.Atom; import com.wildplot.android.parsing.ExpressionFormatException; import com.wildplot.android.parsing.TopLevelParser; import com.wildplot.android.parsing.TreeElement; /** * @author Michael Goldbach * */ public class YVariableAtom implements TreeElement { private Atom.AtomType atomType = Atom.AtomType.VARIABLE; private TopLevelParser parser; public YVariableAtom(TopLevelParser parser){ this.parser = parser; } public Atom.AtomType getAtomType() { return atomType; } @Override public double getValue() { if (atomType != Atom.AtomType.INVALID){ return parser.getY(); } else throw new ExpressionFormatException("Number is Invalid, cannot parse"); } @Override public boolean isVariable() { return true; } }