com.graphbuilder.math.ExpressionParseException Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of curvesapi Show documentation
Show all versions of curvesapi Show documentation
Implementation of various mathematical curves that define themselves over a set of control points. The API is written in Java. The curves supported are: Bezier, B-Spline, Cardinal Spline, Catmull-Rom Spline, Lagrange, Natural Cubic Spline, and NURBS.
package com.graphbuilder.math;
/**
Exception thrown if expression cannot be parsed correctly.
@see com.graphbuilder.math.ExpressionTree
*/
public class ExpressionParseException extends RuntimeException {
private String descrip = null;
private int index = 0;
public ExpressionParseException(String descrip, int index) {
this.descrip = descrip;
this.index = index;
}
/**
Returns the description that explains why the exception was thrown.
*/
public String getDescription() {
return descrip;
}
/**
Returns an index value into the expression string. Note, the index value
may be less than zero or greater then the length of the expression string.
*/
public int getIndex() {
return index;
}
/**
Returns a string formatted such as "(index) description".
*/
public String toString() {
return "(" + index + ") " + descrip;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy