Synthia
Generic and flexible data structure generator
StringNodePicker.java
Go to the documentation of this file.
1
/*
2
Synthia, a data structure generator
3
Copyright (C) 2019-2020 Laboratoire d'informatique formelle
4
Université du Québec à Chicoutimi, Canada
5
6
This program is free software: you can redistribute it and/or modify
7
it under the terms of the GNU Lesser General Public License as published
8
by the Free Software Foundation, either version 3 of the License, or
9
(at your option) any later version.
10
11
This program is distributed in the hope that it will be useful,
12
but WITHOUT ANY WARRANTY; without even the implied warranty of
13
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
GNU Lesser General Public License for more details.
15
16
You should have received a copy of the GNU Lesser General Public License
17
along with this program. If not, see <http://www.gnu.org/licenses/>.
18
*/
19
package
ca.uqac.lif.synthia.tree;
20
21
import
ca
.
uqac
.
lif
.
synthia
.
Picker
;
22
23
public
class
StringNodePicker
extends
NodePicker
<String>
24
{
25
/**
26
* Creates a new instance of the picker.
27
* @param label_picker The picker for the nodes' labels
28
*/
29
public
StringNodePicker
(
Picker<String>
label_picker)
30
{
31
super(label_picker);
32
}
33
34
@Override
35
public
Node<String>
pick
()
36
{
37
return
new
Node<String>
(
m_labelPicker
.pick());
38
}
39
40
@Override
41
public
StringNodePicker
duplicate
(
boolean
with_state)
42
{
43
return
new
StringNodePicker
(
m_labelPicker
.duplicate(with_state));
44
}
45
}
ca.uqac.lif.synthia.Picker
Picks an object.
Definition:
Picker.java:36
ca.uqac.lif.synthia.tree.StringNodePicker
Definition:
StringNodePicker.java:23
ca.uqac.lif.synthia.tree.NodePicker
Definition:
NodePicker.java:23
ca.uqac.lif.synthia.tree.StringNodePicker.StringNodePicker
StringNodePicker(Picker< String > label_picker)
Creates a new instance of the picker.
Definition:
StringNodePicker.java:29
ca.uqac
ca.uqac.lif.synthia
Definition:
Bounded.java:19
ca.uqac.lif.synthia.tree.StringNodePicker.pick
Node< String > pick()
Definition:
StringNodePicker.java:35
ca.uqac.lif
ca.uqac.lif.synthia.tree.NodePicker< String >::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
ca.uqac.lif.synthia.tree.StringNodePicker.duplicate
StringNodePicker duplicate(boolean with_state)
Definition:
StringNodePicker.java:41
Source
Tree
src
ca
uqac
lif
synthia
tree
StringNodePicker.java
Generated by
1.8.17