Author |
Message |
EMebane
Joined: Apr 15, 2019 Posts: 98
|
Posted: Jul 4, 2020 2:39 AM Post subject: import java.util.Random into expressionevaluator |
|
How may I access the Random class in an objectExpressionEvaluator?
I don't see a way in the Advanced settings to add an import statement, such as: import java.util.Random; |
|
 |
EMebane
Joined: Apr 15, 2019 Posts: 98
|
Posted: Jul 4, 2020 6:00 AM Post subject: |
|
I'd also like to be able to use Dictionary which is in java.util. |
|
 |
jarek
Joined: Oct 22, 2007 Posts: 1056
|
Posted: Jul 4, 2020 1:51 PM Post subject: |
|
There is no way to have import statement in expression evaluators.
But you can use full class names, for example:
new java.util.Random().nextFloat(); |
|
 |
EMebane
Joined: Apr 15, 2019 Posts: 98
|
Posted: Jul 5, 2020 2:06 AM Post subject: |
|
That works, thanks! |
|