Synthia
Generic and flexible data structure generator
IntegerNodePicker.java
Go to the documentation of this file.
1 package ca.uqac.lif.synthia.tree;
2 
3 import ca.uqac.lif.synthia.Picker;
4 
5 public class IntegerNodePicker extends NodePicker<Integer>
6 {
7  /**
8  * Creates a new instance of the picker.
9  * @param label_picker The picker for the nodes' labels
10  */
11  public IntegerNodePicker(Picker<Integer> label_picker)
12  {
13  super(label_picker);
14  }
15 
16  @Override
18  {
19  return new Node<Integer>(m_labelPicker.pick());
20  }
21 
22  @Override
23  public IntegerNodePicker duplicate(boolean with_state)
24  {
25  return new IntegerNodePicker(m_labelPicker.duplicate(with_state));
26  }
27 }
ca.uqac.lif.synthia.Picker
Picks an object.
Definition: Picker.java:36
ca.uqac.lif.synthia.tree.NodePicker
Definition: NodePicker.java:23
ca.uqac.lif.synthia.tree.IntegerNodePicker.IntegerNodePicker
IntegerNodePicker(Picker< Integer > label_picker)
Creates a new instance of the picker.
Definition: IntegerNodePicker.java:11
ca.uqac.lif.synthia.tree.IntegerNodePicker.pick
Node< Integer > pick()
Definition: IntegerNodePicker.java:17
ca.uqac
ca.uqac.lif.synthia.tree.IntegerNodePicker.duplicate
IntegerNodePicker duplicate(boolean with_state)
Definition: IntegerNodePicker.java:23
ca.uqac.lif.synthia
Definition: Bounded.java:19
ca.uqac.lif.synthia.tree.IntegerNodePicker
Definition: IntegerNodePicker.java:5
ca.uqac.lif
ca.uqac.lif.synthia.tree.NodePicker< Integer >::m_labelPicker
Picker< T > m_labelPicker
The picker for the nodes' labels.
Definition: NodePicker.java:28
ca
ca.uqac.lif.synthia.tree.Node
Simple implementation of a labeled nodel.
Definition: Node.java:31