- All Implemented Interfaces:
Serializable, Comparable<RpnCalculator.Token_Symbol>, java.lang.constant.Constable
- Enclosing class:
RpnCalculator
Token_Symbol class.
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E>Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionToken taking the absolute value.Token adding two values, treating unknown as zero.Token taking the logical and of two values.Token taking the arctangent, in radians.Token taking the two-argument arctangent, in radians.Token averaging a variable's values.Token rounding up to an integer.Token taking the cosine of an angle in radians.Token counting a variable's known values.Token pushing the day of the month.Token converting degrees to radians.Token dividing two values.Token duplicating the top of the stack.Token pushing e.Token testing equality.Token exchanging the top two stack entries.Token raising e to a power.Token rounding down to an integer.Token testing greater-or-equal.Token testing greater-than.Token pushing the hour of the day.Token choosing one of two values by a condition.Token pushing positive infinity.Token testing whether a value is infinite.Token testing less-or-equal.Token limiting a value to a range.Token taking the base-10 logarithm.Token testing less-than.Token pushing the current local time.Token keeping the larger of two values.Token keeping the larger value, unknowns ignored.Token keeping the smaller of two values.Token keeping the smaller value, unknowns ignored.Token subtracting two values.Token pushing the minute of the hour.Token taking the remainder of a division.Token pushing the month of the current time.Token multiplying two values.Token testing inequality.Token pushing negative infinity.Token pushing the current time.Token holding a literal number.Token taking the logical or of two values.Token pushing pi.Token adding two values.Token discarding the top of the stack.Token raising one value to the power of another.Token predicting a value from a trend.Token giving the sigma of a trend prediction.Token pushing the previous step's value.Token converting radians to degrees.Token pushing a pseudo-random value.Token reversing a variable's values.Token rounding to the nearest integer, alias of ROUND.Token rounding to the nearest integer.Token pushing the second of the minute.Token pushing the sign of a value.Token taking the sine of an angle in radians.Token sorting a variable's values.Token taking the square root.Token pushing the consolidation step, in seconds.Token pushing the current time slot.Token computing a moving-average trend.Token computing a moving-average trend, unknowns kept.Token testing whether a value is unknown.Token pushing an unknown value.Token referencing a data source variable.Token pushing the day of the week.Token taking the logical exclusive or of two values.Token pushing the year of the current time.Field Summary
FieldsConstructor Summary
ConstructorsModifierConstructorDescriptionprivateToken_Symbol(String token_string) Binds a token to its source text.Method Summary
Modifier and TypeMethodDescription(package private) abstract voidDo methodstatic RpnCalculator.Token_SymbolReturns the enum constant of this class with the specified name.static RpnCalculator.Token_Symbol[]values()Returns an array containing the constants of this enum class, in the order they are declared.
Enum Constant Details
TKN_VAR
Token referencing a data source variable.TKN_NUM
Token holding a literal number.TKN_PLUS
Token adding two values.TKN_ADDNAN
Token adding two values, treating unknown as zero.TKN_MINUS
Token subtracting two values.TKN_MULT
Token multiplying two values.TKN_DIV
Token dividing two values.TKN_MOD
Token taking the remainder of a division.TKN_SIN
Token taking the sine of an angle in radians.TKN_COS
Token taking the cosine of an angle in radians.TKN_LOG
Token taking the base-10 logarithm.TKN_EXP
Token raising e to a power.TKN_SQRT
Token taking the square root.TKN_ATAN
Token taking the arctangent, in radians.TKN_ATAN2
Token taking the two-argument arctangent, in radians.TKN_FLOOR
Token rounding down to an integer.TKN_CEIL
Token rounding up to an integer.TKN_DEG2RAD
Token converting degrees to radians.TKN_RAD2DEG
Token converting radians to degrees.TKN_ROUND
Token rounding to the nearest integer.TKN_POW
Token raising one value to the power of another.TKN_ABS
Token taking the absolute value.TKN_RANDOM
Token pushing a pseudo-random value.TKN_RND
Token rounding to the nearest integer, alias of ROUND.TKN_UN
Token testing whether a value is unknown.TKN_ISINF
Token testing whether a value is infinite.TKN_LT
Token testing less-than.TKN_LE
Token testing less-or-equal.TKN_GT
Token testing greater-than.TKN_GE
Token testing greater-or-equal.TKN_EQ
Token testing equality.TKN_NE
Token testing inequality.TKN_IF
Token choosing one of two values by a condition.TKN_MIN
Token keeping the smaller of two values.TKN_MAX
Token keeping the larger of two values.TKN_MINNAN
Token keeping the smaller value, unknowns ignored.TKN_MAXNAN
Token keeping the larger value, unknowns ignored.TKN_LIMIT
Token limiting a value to a range.TKN_DUP
Token duplicating the top of the stack.TKN_EXC
Token exchanging the top two stack entries.TKN_POP
Token discarding the top of the stack.TKN_UNKN
Token pushing an unknown value.TKN_PI
Token pushing pi.TKN_E
Token pushing e.TKN_INF
Token pushing positive infinity.TKN_NEGINF
Token pushing negative infinity.TKN_AND
Token taking the logical and of two values.TKN_OR
Token taking the logical or of two values.TKN_XOR
Token taking the logical exclusive or of two values.TKN_PREV
Token pushing the previous step's value.TKN_STEP
Token pushing the consolidation step, in seconds.TKN_NOW
Token pushing the current time.TKN_TIME
Token pushing the current time slot.TKN_LTIME
Token pushing the current local time.TKN_YEAR
Token pushing the year of the current time.TKN_MONTH
Token pushing the month of the current time.TKN_DATE
Token pushing the day of the month.TKN_HOUR
Token pushing the hour of the day.TKN_MINUTE
Token pushing the minute of the hour.TKN_SECOND
Token pushing the second of the minute.TKN_WEEK
Token pushing the day of the week.TKN_SIGN
Token pushing the sign of a value.TKN_SORT
Token sorting a variable's values.TKN_REV
Token reversing a variable's values.TKN_AVG
Token averaging a variable's values.TKN_COUNT
Token counting a variable's known values.TKN_TREND
Token computing a moving-average trend.TKN_TRENDNAN
Token computing a moving-average trend, unknowns kept.TKN_PREDICT
Token predicting a value from a trend.TKN_PREDICTSIGMA
Token giving the sigma of a trend prediction.
Field Details
token_string
token_string.
Constructor Details
Token_Symbol
Binds a token to its source text.- Parameters:
token_string- the text that names this token
Method Details
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException- if the argument is null
do_method
Do method- Parameters:
c- the calculator evaluating this tokens- the mutable evaluation state for the current slot