Skip to content
Snippets Groups Projects
Commit 55076de7 authored by Alexander Diewald's avatar Alexander Diewald
Browse files

- Add parser interface for exploration expression language (visitor). This...

- Add parser interface for exploration expression language (visitor). This includes an additional EOperation for IExpressions to accept visitors.
- Implement a base class for expression evaluators.
- Add a Deployment validator that performs an evaluation against a given ExplorationSpecification and which uses expression evaluator base class.
- Add a context menu entry to launch the Deployment validation.
- Add two Utility methods to handle integer and floating point numbers.
refs 2960
parent 63986b6b
No related branches found
No related tags found
No related merge requests found
......@@ -32,7 +32,7 @@ import org.apache.commons.lang.math.NumberUtils;
* @author diewald
* @author $Author: hoelzl $
* @version $Rev: 18709 $
* @ConQAT.Rating YELLOW Hash: 27F367B924A70CBAD1211670F21AED18
* @ConQAT.Rating YELLOW Hash: B3EA1B4325C6585B186F6ADBA970B9E6
*/
public class BaseMathUtils {
......@@ -195,6 +195,19 @@ public class BaseMathUtils {
return false;
}
/**
* Predicate whether the given Number is an integer of the types Byte, Short, Integer, Long,
* BigInteger.
*
* @param value
* Number to test.
* @return boolean if the given Number is an integer number.
*/
public static boolean isIntegerNumber(Number value) {
return(value instanceof Byte || value instanceof Short || value instanceof Integer ||
value instanceof Long || value instanceof BigInteger);
}
/**
* Creates an {@link ArithmeticException} if an over-/underflow occurs when converting the given
* {@code number} to the given {@code targetType}.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment