Synthia
Generic and flexible data structure generator
IndexPicker.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;
20 
21 /**
22  * Picker for an integer from 0 to a fixed bound. This interface extends
23  * <tt>Picker&lt;Integer&gt;</tt> by allowing the bound to be specified
24  * and modified after the construction of the object, using
25  * {@link #setInterval(int) setInterval()}.
26  *
27  * @author Sylvain Hallé
28  * @ingroup API
29  */
30 public interface IndexPicker extends Picker<Integer>
31 {
32  /**
33  * Sets the range for the index picker
34  * @param size The maximum value that can be picked
35  * @return This picker
36  */
37  public IndexPicker setInterval(int size);
38 
39  /**
40  * Creates a copy of the picker.
41  * @param with_state If set to <tt>false</tt>, the returned copy is set to
42  * the class' initial state (i.e. same thing as calling the picker's
43  * constructor). If set to <tt>true</tt>, the returned copy is put into the
44  * same internal state as the object it is copied from.
45  * @return The copy of the picker
46  */
47  @Override
48  public IndexPicker duplicate(boolean with_state);
49 }
ca.uqac.lif.synthia.Picker
Picks an object.
Definition: Picker.java:36
ca.uqac.lif.synthia.IndexPicker.duplicate
IndexPicker duplicate(boolean with_state)
Creates a copy of the picker.
ca.uqac.lif.synthia.IndexPicker.setInterval
IndexPicker setInterval(int size)
Sets the range for the index picker.
ca.uqac.lif.synthia.IndexPicker
Picker for an integer from 0 to a fixed bound.
Definition: IndexPicker.java:30