|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectlt.monarch.math.FormulaUtil
public class FormulaUtil extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected static java.lang.String |
logDelimiters
String of possible logical delimiters |
protected static java.lang.String[] |
logOperation
Array of possible logical operations |
protected static java.lang.String |
operators
Possible operators |
| Modifier and Type | Method and Description |
|---|---|
static int |
compareOperators(java.lang.String op1,
java.lang.String op2)
Compares the operators. |
static boolean |
isBoolean(java.lang.String string)
Checks if the string is boolean value |
static boolean |
isConstant(java.lang.String string)
Checks if the string is the constant. |
static boolean |
isDouble(java.lang.String string)
Checks if the string is double number. |
static boolean |
isExpression(java.lang.String string)
Checks if the string is numerical formula (not logical) |
static boolean |
isFunction(java.lang.String string)
Checks if the string is the function. |
static boolean |
isInteger(java.lang.String string)
Checks if the string is integer number. |
static boolean |
isLeftBracket(java.lang.String string)
Checks if the string is the left bracket. |
static boolean |
isLogOperator(java.lang.String operation)
Checks if the string is a logical operation |
static boolean |
isOperator(java.lang.String string)
Checks if the string is the operator. |
static boolean |
isRightBracket(java.lang.String string)
Checks if the string is the right bracket. |
static boolean |
isVariable(java.lang.String string)
Checks if the string is the variable. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final java.lang.String operators
protected static final java.lang.String[] logOperation
protected static final java.lang.String logDelimiters
| Method Detail |
|---|
public static boolean isVariable(java.lang.String string)
string - the supplied string that contains one variables_prefix and several (or none)
number symbols.
public static int compareOperators(java.lang.String op1,
java.lang.String op2)
throws java.lang.Exception
op1 - First operationop2 - Second operationjava.lang.Exception - if wrong delimiter has been foundpublic static boolean isLeftBracket(java.lang.String string)
string - The supplied string that contains one symbol.public static boolean isRightBracket(java.lang.String string)
string - The supplied string that contains one symbol.public static boolean isConstant(java.lang.String string)
string - The string which contains one symbol.public static boolean isFunction(java.lang.String string)
string - The string which contains one symbolpublic static boolean isDouble(java.lang.String string)
string - The string which contains one or more symbolspublic static boolean isInteger(java.lang.String string)
string - The string which contains one or more symbolspublic static boolean isOperator(java.lang.String string)
string - The string which contains one or more symbolspublic static boolean isLogOperator(java.lang.String operation)
operation - The string which contains one or more symbolspublic static boolean isExpression(java.lang.String string)
string - string to checkpublic static boolean isBoolean(java.lang.String string)
string - string to check for boolean value
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||