![]() |
Synthia
Generic and flexible data structure generator
|
Allows values of a single picker to be shared among multiple copies of a picker instance.
| <T> | The type of the elements to pick |
Definition at line 36 of file Share.java.
Classes | |
| class | QueuePicker |
| A picker that acts as a proxy for the values obtained by the parent Share picker. More... | |
Public Member Functions | |
| Share (Picker<? extends T > picker) | |
| Creates a new instance of the share picker. More... | |
| QueuePicker | getCopy () |
| Creates a new copy of QueuePicker from the original picker. More... | |
| void | reset () |
| Resets the original picker and all its copies. More... | |
Protected Member Functions | |
| void | ask () |
| Asks for a new value from the underlying picker, and adds this value to the internal queue of each linked instance of QueuePicker. More... | |
Protected Attributes | |
| Picker<? extends T > | m_picker |
| The underlying picker from which elements are taken. More... | |
| Set< QueuePicker > | m_pickers |
| The set of "spawned" copies created. More... | |
| ca.uqac.lif.synthia.util.Share< T >.Share | ( | Picker<? extends T > | picker | ) |
Creates a new instance of the share picker.
| picker | The underlying picker from which elements are taken |
Definition at line 52 of file Share.java.
|
protected |
Asks for a new value from the underlying picker, and adds this value to the internal queue of each linked instance of QueuePicker.
Definition at line 86 of file Share.java.
| QueuePicker ca.uqac.lif.synthia.util.Share< T >.getCopy | ( | ) |
Creates a new copy of QueuePicker from the original picker.
Definition at line 63 of file Share.java.
| void ca.uqac.lif.synthia.util.Share< T >.reset | ( | ) |
Resets the original picker and all its copies.
Definition at line 73 of file Share.java.
|
protected |
The underlying picker from which elements are taken.
Definition at line 41 of file Share.java.
|
protected |
The set of "spawned" copies created.
Definition at line 46 of file Share.java.