Synthia
Generic and flexible data structure generator
ca.uqac.lif.synthia.Picker< T > Interface Template Reference

Detailed Description

Picks an object.

This is the interface that most classes in this library implement.

  • Objects of a given type T are obtained by calling the pick() method.
  • The picker can be put back into its initial state by calling its reset() method.
  • Copies of the picker can be made by calling its duplicate(boolean) method. One can ask whether the copied is put in the initial state, or in the same state as the picker it is copied from.
Parameters
<T>The type of object that the picker picks

Definition at line 36 of file Picker.java.

Inheritance diagram for ca.uqac.lif.synthia.Picker< T >:

Public Member Functions

void reset ()
 Puts the picker back into its initial state. More...
 
pick ()
 Picks an object. More...
 
Picker< T > duplicate (boolean with_state)
 Creates a copy of the picker. More...
 

Member Function Documentation

◆ duplicate()

Picker<T> ca.uqac.lif.synthia.Picker< T >.duplicate ( boolean  with_state)

Creates a copy of the picker.

Parameters
with_stateIf 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.
Returns
The copy of the picker

Implemented in ca.uqac.lif.synthia.string.RandomString, ca.uqac.lif.synthia.sequence.MarkovChain< T >, ca.uqac.lif.synthia.random.PoissonInteger, ca.uqac.lif.synthia.enumerative.AllPickers, ca.uqac.lif.synthia.enumerative.AllIntegers, ca.uqac.lif.synthia.sequence.Playback< T >, ca.uqac.lif.synthia.util.Tick, ca.uqac.lif.synthia.relative.PickIf< T >, ca.uqac.lif.synthia.util.Choice< T >, ca.uqac.lif.synthia.enumerative.AllElements< T >, ca.uqac.lif.synthia.sequence.Knit< T >, ca.uqac.lif.synthia.collection.ComposeShrunkList< T >, ca.uqac.lif.synthia.util.Share< T >.QueuePicker, ca.uqac.lif.synthia.random.RandomInteger, ca.uqac.lif.synthia.grammar.GrammarSentence, ca.uqac.lif.synthia.vector.HyperspherePicker, ca.uqac.lif.synthia.sequence.Record< T >, ca.uqac.lif.synthia.random.RandomFloat, ca.uqac.lif.synthia.util.Once< T >, examples.graphs.BarabasiAlbert< T >, ca.uqac.lif.synthia.string.RandomSubString, ca.uqac.lif.synthia.tree.TreePicker< T >, ca.uqac.lif.synthia.random.RandomBoolean, ca.uqac.lif.synthia.random.RandomSubList< T >, ca.uqac.lif.synthia.collection.ComposeList< T >, ca.uqac.lif.synthia.util.Freeze< T >, ca.uqac.lif.synthia.collection.MutateElement< T >, ca.uqac.lif.synthia.util.Constant< T >, ca.uqac.lif.synthia.util.DiscardRatio, ca.uqac.lif.synthia.string.RandomPrefix, ca.uqac.lif.synthia.vector.PrismPicker, ca.uqac.lif.synthia.collection.CompositePicker< T >, ca.uqac.lif.synthia.enumerative.Unbound< T >, ca.uqac.lif.synthia.enumerative.Bound< T >, ca.uqac.lif.synthia.collection.Swap< T >, ca.uqac.lif.synthia.random.BiasedRandomFloat, ca.uqac.lif.synthia.enumerative.AllBooleans, ca.uqac.lif.synthia.util.Mutate< T >, ca.uqac.lif.synthia.util.NothingPicker< T >, ca.uqac.lif.synthia.collection.DeleteElement< T >, ca.uqac.lif.synthia.relative.PickSmallerComparable< T >, ca.uqac.lif.synthia.map.AreaMapPicker, ca.uqac.lif.synthia.relative.PickSmallerComparator< T >, ca.uqac.lif.synthia.string.RandomSuffix, ca.uqac.lif.synthia.util.AsInt, ca.uqac.lif.synthia.util.AsLong, ca.uqac.lif.synthia.util.Delay, examples.apache.VisitorPicker, ca.uqac.lif.synthia.tree.ColoredNodePicker, ca.uqac.lif.synthia.string.AsString, ca.uqac.lif.synthia.sequence.BehaviorTree< T >, ca.uqac.lif.synthia.string.RandomTrim, ca.uqac.lif.synthia.widget.ChooseAction, ca.uqac.lif.synthia.signal.SineWave, ca.uqac.lif.synthia.vector.VectorPicker, and ca.uqac.lif.synthia.util.Replace< T >.

◆ pick()

T ca.uqac.lif.synthia.Picker< T >.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.

Returns
The object

Implemented in ca.uqac.lif.synthia.string.RandomString, ca.uqac.lif.synthia.util.Tick, ca.uqac.lif.synthia.enumerative.AllIntegers, ca.uqac.lif.synthia.sequence.Playback< T >, ca.uqac.lif.synthia.sequence.MarkovChain< T >, ca.uqac.lif.synthia.relative.PickIf< T >, ca.uqac.lif.synthia.util.Choice< T >, ca.uqac.lif.synthia.random.PoissonInteger, ca.uqac.lif.synthia.util.Share< T >.QueuePicker, ca.uqac.lif.synthia.random.RandomInteger, ca.uqac.lif.synthia.sequence.Knit< T >, ca.uqac.lif.synthia.sequence.Record< T >, ca.uqac.lif.synthia.random.RandomFloat, ca.uqac.lif.synthia.vector.HyperspherePicker, ca.uqac.lif.synthia.collection.ComposeList< T >, ca.uqac.lif.synthia.collection.CompositePicker< T >, ca.uqac.lif.synthia.util.Freeze< T >, ca.uqac.lif.synthia.random.RandomBoolean, ca.uqac.lif.synthia.util.Once< T >, ca.uqac.lif.synthia.enumerative.AllPickers, ca.uqac.lif.synthia.random.RandomSubList< T >, ca.uqac.lif.synthia.collection.ComposeShrunkList< T >, ca.uqac.lif.synthia.string.RandomSubString, examples.graphs.BarabasiAlbert< T >, ca.uqac.lif.synthia.string.RandomPrefix, ca.uqac.lif.synthia.grammar.GrammarSentence, ca.uqac.lif.synthia.util.DiscardRatio, ca.uqac.lif.synthia.vector.PrismPicker, ca.uqac.lif.synthia.enumerative.AllElements< T >, ca.uqac.lif.synthia.enumerative.Bound< T >, ca.uqac.lif.synthia.collection.MutateElement< T >, ca.uqac.lif.synthia.tree.TreePicker< T >, ca.uqac.lif.synthia.collection.Swap< T >, ca.uqac.lif.synthia.enumerative.AllBooleans, ca.uqac.lif.synthia.util.Constant< T >, ca.uqac.lif.synthia.util.NothingPicker< T >, ca.uqac.lif.synthia.util.Mutate< T >, ca.uqac.lif.synthia.string.RandomSuffix, ca.uqac.lif.synthia.collection.DeleteElement< T >, ca.uqac.lif.synthia.util.Delay, ca.uqac.lif.synthia.tree.ColoredNodePicker, ca.uqac.lif.synthia.random.BiasedRandomFloat, examples.apache.VisitorPicker, ca.uqac.lif.synthia.string.AsString, ca.uqac.lif.synthia.util.AsInt, ca.uqac.lif.synthia.util.AsLong, ca.uqac.lif.synthia.enumerative.Unbound< T >, ca.uqac.lif.synthia.widget.ChooseAction, ca.uqac.lif.synthia.string.RandomTrim, ca.uqac.lif.synthia.map.AreaMapPicker, ca.uqac.lif.synthia.signal.SineWave, and ca.uqac.lif.synthia.util.Replace< T >.

◆ reset()

void ca.uqac.lif.synthia.Picker< T >.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.Resettable.

Implemented in ca.uqac.lif.synthia.sequence.MarkovChain< T >, ca.uqac.lif.synthia.relative.PickIf< T >, ca.uqac.lif.synthia.sequence.Playback< T >, ca.uqac.lif.synthia.string.RandomString, ca.uqac.lif.synthia.util.Tick, ca.uqac.lif.synthia.enumerative.AllIntegers, ca.uqac.lif.synthia.util.Share< T >.QueuePicker, ca.uqac.lif.synthia.collection.CompositePicker< T >, ca.uqac.lif.synthia.util.Choice< T >, ca.uqac.lif.synthia.enumerative.AllElements< T >, ca.uqac.lif.synthia.sequence.Knit< T >, ca.uqac.lif.synthia.sequence.Record< T >, ca.uqac.lif.synthia.vector.HyperspherePicker, ca.uqac.lif.synthia.collection.ComposeList< T >, ca.uqac.lif.synthia.collection.MutateElement< T >, ca.uqac.lif.synthia.random.RandomSubList< T >, ca.uqac.lif.synthia.util.Freeze< T >, ca.uqac.lif.synthia.collection.ComposeShrunkList< T >, ca.uqac.lif.synthia.util.Once< T >, ca.uqac.lif.synthia.string.RandomSubString, ca.uqac.lif.synthia.enumerative.AllPickers, ca.uqac.lif.synthia.string.RandomPrefix, ca.uqac.lif.synthia.util.Constant< T >, ca.uqac.lif.synthia.grammar.GrammarSentence, ca.uqac.lif.synthia.random.RandomPicker< T >, ca.uqac.lif.synthia.util.AsInt, ca.uqac.lif.synthia.util.AsLong, ca.uqac.lif.synthia.util.DiscardRatio, ca.uqac.lif.synthia.signal.PeriodicSignal, examples.apache.VisitorPicker, ca.uqac.lif.synthia.random.AffineTransform< T extends Number >, ca.uqac.lif.synthia.string.AsString, ca.uqac.lif.synthia.util.Mutator< T >, ca.uqac.lif.synthia.tree.GraphPicker< T >, ca.uqac.lif.synthia.vector.PrismPicker, ca.uqac.lif.synthia.enumerative.Bound< T >, ca.uqac.lif.synthia.enumerative.AllBooleans, ca.uqac.lif.synthia.util.NothingPicker< T >, ca.uqac.lif.synthia.tree.TreePicker< T >, ca.uqac.lif.synthia.util.Delay, ca.uqac.lif.synthia.tree.ColoredNodePicker, ca.uqac.lif.synthia.tree.NodePicker< T >, ca.uqac.lif.synthia.enumerative.Unbound< T >, ca.uqac.lif.synthia.widget.ChooseAction, ca.uqac.lif.synthia.map.AreaMapPicker, and ca.uqac.lif.synthia.util.Replace< T >.


The documentation for this interface was generated from the following file: