public static final class UndoableAction.Utils
extends java.lang.Object
Constructor and Description |
---|
UndoableAction.Utils() |
Modifier and Type | Method and Description |
---|---|
static UndoableAction |
getCombined(UndoableAction[] subActions)
Create an action that combines multiple actions
|
static UndoableAction |
getDistributedSelection(UndoableAction[] subActions,
double[] actionProportions)
Create an action that selects uniformly from a number of sub actions
|
static UndoableAction |
getSimpleDesparation(UndoableAction primaryAction,
UndoableAction desparateAction,
double desparationLimit,
int desparationInterval)
A simple tool for change actions when things get desparate
|
static UndoableAction |
getSimpleUniformSelection(UndoableAction[] subActions)
Create an action that selects uniformly from a number of sub actions
|
public static final UndoableAction getSimpleUniformSelection(UndoableAction[] subActions)
subActions
- public static final UndoableAction getDistributedSelection(UndoableAction[] subActions, double[] actionProportions)
subActions
- acitionProportions
- java.lang.IllegalArgumentException
- if action array and proportion arrays are different lengthspublic static final UndoableAction getCombined(UndoableAction[] subActions)
subActions
- The actions that are do in turn.public static final UndoableAction getSimpleDesparation(UndoableAction primaryAction, UndoableAction desparateAction, double desparationLimit, int desparationInterval)
primaryAction
- The main action to do when things are going welldesparateAction
- The action to do when things get desparate. The desperation value for the desparate action will be scaled according to how much over the limit we aredesparationLimit
- The desparate value at which we start doing the desparate actiondesparationInterval
- The time between desparate actions when we cross the cutoff (a value of one will mean do all the time after desparation value has crossed cutoff)