![]() |
Synthia
Generic and flexible data structure generator
|
Picker that does not produce any value, but causes the thread to wait for a moment on every call to pick().
Definition at line 28 of file Delay.java.

Public Member Functions | |
| Delay (Picker<? extends Number > delay) | |
| Creates a new delay picker. More... | |
| void | reset () |
| Puts the picker back into its initial state. More... | |
| Object | pick () |
| Picks an object. More... | |
| Delay | duplicate (boolean with_state) |
| Creates a copy of the picker. More... | |
Static Public Member Functions | |
| static void | wait (float duration) |
| Waits for some time. More... | |
Protected Attributes | |
| Picker<? extends Number > | m_delay |
| The picker deciding on the time to wait, in seconds. More... | |
| ca.uqac.lif.synthia.util.Delay.Delay | ( | Picker<? extends Number > | delay | ) |
Creates a new delay picker.
| delay | The picker deciding on the time to wait, in seconds |
Definition at line 39 of file Delay.java.
| Delay ca.uqac.lif.synthia.util.Delay.duplicate | ( | boolean | with_state | ) |
Creates a copy of the picker.
| with_state | If set to false, the returned copy is set to the class' initial state (i.e. same thing as calling the picker's constructor). If set to true, the returned copy is put into the same internal state as the object it is copied from. |
Implements ca.uqac.lif.synthia.Picker< T >.
Definition at line 59 of file Delay.java.
| Object ca.uqac.lif.synthia.util.Delay.pick | ( | ) |
Picks an object.
Typically, this method is expected to return non-null objects; a null return value is used to signal that no more objects will be produced. That is, once this method returns null, it should normally return null on all subsequent calls.
Implements ca.uqac.lif.synthia.Picker< T >.
Definition at line 52 of file Delay.java.
| void ca.uqac.lif.synthia.util.Delay.reset | ( | ) |
Puts the picker back into its initial state.
This means that the sequence of calls to pick() will produce the same values as when the object was instantiated.
Implements ca.uqac.lif.synthia.Picker< T >.
Definition at line 46 of file Delay.java.
|
static |
Waits for some time.
| duration | The time to wait, in seconds |
Definition at line 68 of file Delay.java.
|
protected |
The picker deciding on the time to wait, in seconds.
Definition at line 33 of file Delay.java.