Uses of Interface
adams.core.VariableUpdater
-
Packages that use VariableUpdater Package Description adams.flow.source adams.flow.standalone adams.flow.transformer -
-
Uses of VariableUpdater in adams.flow.source
Classes in adams.flow.source that implement VariableUpdater Modifier and Type Class Description class
StorageForLoop
Emulates the following for-loop:
- positive step size:
for (int i = lower; i <= upper; i += step)
- negative step size:
for (int i = upper; i >= lower; i += step)
In each iteration, the specified variable gets updated with the current value of the for-loop variable. -
Uses of VariableUpdater in adams.flow.standalone
Classes in adams.flow.standalone that implement VariableUpdater Modifier and Type Class Description class
DeleteVariable
Removes a variable by name or the variables that match the regular expression.class
SetManyVariables
Sets the values of the variables.
Optionally, the specified values can be expanded, in case it is made up of variables itself.
Grammar for mathematical expressions (value type 'MATH_EXPRESSION, MATH_EXPRESSION_ROUND'):
expr_list ::= '=' expr_list expr_part | expr_part ;
expr_part ::= expr ;
expr ::= ( expr )
# data types
| number
| string
| boolean
| date
# constants
| true
| false
| pi
| e
| now()
| today()
# negating numeric value
| -expr
# comparisons
| expr < expr
| expr <= expr
| expr > expr
| expr >= expr
| expr = expr
| expr != expr (or: expr <> expr)
# boolean operations
| ! expr (or: not expr)
| expr & expr (or: expr and expr)
| expr | expr (or: expr or expr)
| if[else] ( expr , expr (if true) , expr (if false) )
| ifmissing ( variable , expr (default value if variable is missing) )
| has ( variable )
| isNaN ( expr )
# arithmetics
| expr + expr
| expr - expr
| expr * expr
| expr / expr
| expr ^ expr (power of)
| expr % expr (modulo)
;
# numeric functions
| abs ( expr )
| sqrt ( expr )
| cbrt ( expr )
| log ( expr )
| log10 ( expr )
| exp ( expr )
| sin ( expr )
| sinh ( expr )
| cos ( expr )
| cosh ( expr )
| tan ( expr )
| tanh ( expr )
| atan ( expr )
| atan2 ( exprY , exprX )
| hypot ( exprX , exprY )
| signum ( expr )
| rint ( expr )
| floor ( expr )
| pow[er] ( expr , expr )
| ceil ( expr )
| min ( expr1 , expr2 )
| max ( expr1 , expr2 )
| year ( expr )
| month ( expr )
| day ( expr )
| hour ( expr )
| minute ( expr )
| second ( expr )
| weekday ( expr )
| weeknum ( expr )
# string functions
| substr ( expr , start [, end] )
| left ( expr , len )
| mid ( expr , start , len )
| right ( expr , len )
| rept ( expr , count )
| concatenate ( expr1 , expr2 [, expr3-5] )
| lower[case] ( expr )
| upper[case] ( expr )
| trim ( expr )
| matches ( expr , regexp )
| trim ( expr )
| len[gth] ( str )
| find ( search , expr [, pos] ) (find 'search' in 'expr', return 1-based position)
| replace ( str , pos , len , newstr )
| substitute ( str , find , replace [, occurrences] )
| str ( expr )
| str ( expr , numdecimals )
| str ( expr , decimalformat )
| ext ( file_str ) (extracts extension from file)
| replaceext ( file_str, ext_str ) (replaces the extension of the file with the new one)
;
Notes:
- Variables are either all alphanumeric and _, starting with uppercase letter (e.g., "ABc_12"),
any character apart from "]" enclosed by "[" and "]" (e.g., "[Hello World]") or
enclosed by single quotes (e.g., "'Hello World'").
- 'start' and 'end' for function 'substr' are indices that start at 1.
- Index 'end' for function 'substr' is excluded (like Java's 'String.substring(int,int)' method)
- Line comments start with '#'.
- Semi-colons (';') or commas (',') can be used as separator in the formulas,
e.g., 'pow(2,2)' is equivalent to 'pow(2;2)'
- dates have to be of format 'yyyy-MM-dd' or 'yyyy-MM-dd HH:mm:ss'
- times have to be of format 'HH:mm:ss' or 'yyyy-MM-dd HH:mm:ss'
- the characters in square brackets in function names are optional:
e.g.class
SetVariable
Sets the value of a variable.
Optionally, the specified value can be expanded, in case it is made up of variables itself.
It is also possible to override the variable value with the value obtained from an environment variable.
Grammar for mathematical expressions (value type 'MATH_EXPRESSION, MATH_EXPRESSION_ROUND'):
expr_list ::= '=' expr_list expr_part | expr_part ;
expr_part ::= expr ;
expr ::= ( expr )
# data types
| number
| string
| boolean
| date
# constants
| true
| false
| pi
| e
| now()
| today()
# negating numeric value
| -expr
# comparisons
| expr < expr
| expr <= expr
| expr > expr
| expr >= expr
| expr = expr
| expr != expr (or: expr <> expr)
# boolean operations
| ! expr (or: not expr)
| expr & expr (or: expr and expr)
| expr | expr (or: expr or expr)
| if[else] ( expr , expr (if true) , expr (if false) )
| ifmissing ( variable , expr (default value if variable is missing) )
| has ( variable )
| isNaN ( expr )
# arithmetics
| expr + expr
| expr - expr
| expr * expr
| expr / expr
| expr ^ expr (power of)
| expr % expr (modulo)
;
# numeric functions
| abs ( expr )
| sqrt ( expr )
| cbrt ( expr )
| log ( expr )
| log10 ( expr )
| exp ( expr )
| sin ( expr )
| sinh ( expr )
| cos ( expr )
| cosh ( expr )
| tan ( expr )
| tanh ( expr )
| atan ( expr )
| atan2 ( exprY , exprX )
| hypot ( exprX , exprY )
| signum ( expr )
| rint ( expr )
| floor ( expr )
| pow[er] ( expr , expr )
| ceil ( expr )
| min ( expr1 , expr2 )
| max ( expr1 , expr2 )
| year ( expr )
| month ( expr )
| day ( expr )
| hour ( expr )
| minute ( expr )
| second ( expr )
| weekday ( expr )
| weeknum ( expr )
# string functions
| substr ( expr , start [, end] )
| left ( expr , len )
| mid ( expr , start , len )
| right ( expr , len )
| rept ( expr , count )
| concatenate ( expr1 , expr2 [, expr3-5] )
| lower[case] ( expr )
| upper[case] ( expr )
| trim ( expr )
| matches ( expr , regexp )
| trim ( expr )
| len[gth] ( str )
| find ( search , expr [, pos] ) (find 'search' in 'expr', return 1-based position)
| replace ( str , pos , len , newstr )
| substitute ( str , find , replace [, occurrences] )
| str ( expr )
| str ( expr , numdecimals )
| str ( expr , decimalformat )
| ext ( file_str ) (extracts extension from file)
| replaceext ( file_str, ext_str ) (replaces the extension of the file with the new one)
;
Notes:
- Variables are either all alphanumeric and _, starting with uppercase letter (e.g., "ABc_12"),
any character apart from "]" enclosed by "[" and "]" (e.g., "[Hello World]") or
enclosed by single quotes (e.g., "'Hello World'").
- 'start' and 'end' for function 'substr' are indices that start at 1.
- Index 'end' for function 'substr' is excluded (like Java's 'String.substring(int,int)' method)
- Line comments start with '#'.
- Semi-colons (';') or commas (',') can be used as separator in the formulas,
e.g., 'pow(2,2)' is equivalent to 'pow(2;2)'
- dates have to be of format 'yyyy-MM-dd' or 'yyyy-MM-dd HH:mm:ss'
- times have to be of format 'HH:mm:ss' or 'yyyy-MM-dd HH:mm:ss'
- the characters in square brackets in function names are optional:
e.g. -
Uses of VariableUpdater in adams.flow.transformer
Classes in adams.flow.transformer that implement VariableUpdater Modifier and Type Class Description class
DeleteVariable
Removes a variable by name or the variables that match the regular expression.class
IncVariable
Increments the value of a variable by either an integer or double increment.
If the variable has not been set yet, it will get set to 0.
If the variable contains a non-numerical value, no increment will be performed.
It is also possible to directly output the updated variable (while discarding the input token).class
SetManyVariables
Sets the values of the variables whenever a token passes through, but does not use the token's value.
Optionally, the specified values can be expanded, in case it is made up of variables itself.
Grammar for mathematical expressions (value type 'MATH_EXPRESSION, MATH_EXPRESSION_ROUND'):
expr_list ::= '=' expr_list expr_part | expr_part ;
expr_part ::= expr ;
expr ::= ( expr )
# data types
| number
| string
| boolean
| date
# constants
| true
| false
| pi
| e
| now()
| today()
# negating numeric value
| -expr
# comparisons
| expr < expr
| expr <= expr
| expr > expr
| expr >= expr
| expr = expr
| expr != expr (or: expr <> expr)
# boolean operations
| ! expr (or: not expr)
| expr & expr (or: expr and expr)
| expr | expr (or: expr or expr)
| if[else] ( expr , expr (if true) , expr (if false) )
| ifmissing ( variable , expr (default value if variable is missing) )
| has ( variable )
| isNaN ( expr )
# arithmetics
| expr + expr
| expr - expr
| expr * expr
| expr / expr
| expr ^ expr (power of)
| expr % expr (modulo)
;
# numeric functions
| abs ( expr )
| sqrt ( expr )
| cbrt ( expr )
| log ( expr )
| log10 ( expr )
| exp ( expr )
| sin ( expr )
| sinh ( expr )
| cos ( expr )
| cosh ( expr )
| tan ( expr )
| tanh ( expr )
| atan ( expr )
| atan2 ( exprY , exprX )
| hypot ( exprX , exprY )
| signum ( expr )
| rint ( expr )
| floor ( expr )
| pow[er] ( expr , expr )
| ceil ( expr )
| min ( expr1 , expr2 )
| max ( expr1 , expr2 )
| year ( expr )
| month ( expr )
| day ( expr )
| hour ( expr )
| minute ( expr )
| second ( expr )
| weekday ( expr )
| weeknum ( expr )
# string functions
| substr ( expr , start [, end] )
| left ( expr , len )
| mid ( expr , start , len )
| right ( expr , len )
| rept ( expr , count )
| concatenate ( expr1 , expr2 [, expr3-5] )
| lower[case] ( expr )
| upper[case] ( expr )
| trim ( expr )
| matches ( expr , regexp )
| trim ( expr )
| len[gth] ( str )
| find ( search , expr [, pos] ) (find 'search' in 'expr', return 1-based position)
| replace ( str , pos , len , newstr )
| substitute ( str , find , replace [, occurrences] )
| str ( expr )
| str ( expr , numdecimals )
| str ( expr , decimalformat )
| ext ( file_str ) (extracts extension from file)
| replaceext ( file_str, ext_str ) (replaces the extension of the file with the new one)
;
Notes:
- Variables are either all alphanumeric and _, starting with uppercase letter (e.g., "ABc_12"),
any character apart from "]" enclosed by "[" and "]" (e.g., "[Hello World]") or
enclosed by single quotes (e.g., "'Hello World'").
- 'start' and 'end' for function 'substr' are indices that start at 1.
- Index 'end' for function 'substr' is excluded (like Java's 'String.substring(int,int)' method)
- Line comments start with '#'.
- Semi-colons (';') or commas (',') can be used as separator in the formulas,
e.g., 'pow(2,2)' is equivalent to 'pow(2;2)'
- dates have to be of format 'yyyy-MM-dd' or 'yyyy-MM-dd HH:mm:ss'
- times have to be of format 'HH:mm:ss' or 'yyyy-MM-dd HH:mm:ss'
- the characters in square brackets in function names are optional:
e.g.class
SetVariable
Sets the value of a variable.class
SwapVariables
Swaps the values of the two variables around, whenever a token passes through.
-