 |
Synthia
Generic and flexible data structure generator
|
Go to the documentation of this file.
19 package ca.uqac.lif.synthia.collection;
21 import java.util.ArrayList;
22 import java.util.Collections;
23 import java.util.List;
63 int len = original.size();
66 List<T> new_list =
new ArrayList<T>(len);
67 new_list.addAll(original);
68 Collections.swap(new_list, position1, position2);
Picker<? extends T > m_picker
The underlying picker producing the values to transform.
Miscellaneous pickers performing various functions.
Swap(Picker<? extends List< T >> picker, Picker< Float > position1, Picker< Float > position2)
Creates a new instance of swap.
Swap< T > duplicate(boolean with_state)
Creates a copy of the picker.
List< T > pick()
Picks an object.
A picker that applies a transformation ("mutation") on the value produced by another picker.
Picker< Float > m_position1
A picker used to select the position of the first element.
Picker< Float > m_position2
A picker used to select the position of the second element.
Mutator that receives a list and selects two elements to be swapped.
Picker< T > duplicate(boolean with_state)
Creates a copy of the picker.