Synthia
Generic and flexible data structure generator
ca.uqac.lif.synthia.util.Replace< T > Class Template Reference

Detailed Description

Author
Sylvain Hallé
Parameters
<T>

Definition at line 12 of file Replace.java.

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

Public Member Functions

 Replace (Picker<? extends T > picker, Picker<? extends T > replacement)
 
void reset ()
 Puts the picker back into its initial state. More...
 
pick ()
 Picks an object. More...
 
Replace< T > duplicate (boolean with_state)
 Creates a copy of the picker. More...
 
- Public Member Functions inherited from ca.uqac.lif.synthia.util.Mutator< T >
 Mutator (Picker<? extends T > picker)
 Creates a new instance of mutator. More...
 
Mutator< T > setPicker (Picker<? extends T > picker)
 Sets the picker producing the values to transform. More...
 
PartNode getExplanation (Part p)
 
PartNode getExplanation (Part p, NodeFactory f)
 

Protected Attributes

Picker<? extends T > m_replacement
 
- Protected Attributes inherited from ca.uqac.lif.synthia.util.Mutator< T >
Picker<? extends T > m_picker
 The underlying picker producing the values to transform. More...
 

Additional Inherited Members

- Protected Member Functions inherited from ca.uqac.lif.synthia.util.Mutator< T >
PartNode getExplanationForOutput (int output_index, Part p, NodeFactory f)
 
void copyInto (Mutator< T > m, boolean with_state)
 

Constructor & Destructor Documentation

◆ Replace()

ca.uqac.lif.synthia.util.Replace< T >.Replace ( Picker<? extends T >  picker,
Picker<? extends T >  replacement 
)

Definition at line 16 of file Replace.java.

Member Function Documentation

◆ duplicate()

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

Implements ca.uqac.lif.synthia.Picker< T >.

Definition at line 36 of file Replace.java.

◆ 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

Implements ca.uqac.lif.synthia.Picker< T >.

Definition at line 30 of file Replace.java.

◆ reset()

void ca.uqac.lif.synthia.util.Replace< 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.

Reimplemented from ca.uqac.lif.synthia.util.Mutator< T >.

Definition at line 23 of file Replace.java.

Member Data Documentation

◆ m_replacement

Picker<? extends T> ca.uqac.lif.synthia.util.Replace< T >.m_replacement
protected

Definition at line 14 of file Replace.java.


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