Package com.fathzer.soft.javaluator
Enum DoubleEvaluator.Style
- All Implemented Interfaces:
Serializable,Comparable<DoubleEvaluator.Style>,java.lang.constant.Constable
- Enclosing class:
- DoubleEvaluator
The order or operations (operator precedence) is not clearly defined, especially between the unary minus operator and exponentiation
operator (see http://en.wikipedia.org/wiki/Order_of_operations).
These constants define the operator precedence styles.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionstatic DoubleEvaluator.StyleReturns the enum constant of this type with the specified name.static DoubleEvaluator.Style[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
STANDARD
The most commonly operator precedence, where the unary minus as a lower precedence than the exponentiation.
With this style, used by Google, Wolfram alpha, and many others, -2^2=-4. -
EXCEL
The operator precedence used by Excel, or bash shell script language, where the unary minus as a higher precedence than the exponentiation.
With this style, -2^2=4.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-