1 package it.unical.mat.embasp.base;
3 import java.util.ArrayList;
4 import java.util.HashMap;
29 protected Map<Integer, OptionDescriptor>
options;
46 int last_index =
options.size();
47 final int current_value = last_index;
63 final int current_value = last_index;
68 protected List<OptionDescriptor> collect_options(
final List<Integer> option_index) {
69 final List<OptionDescriptor> input_option =
new ArrayList<>();
71 if (option_index ==
null)
73 input_option.add(
options.get(option.getKey()));
75 for (
final int index : option_index)
76 input_option.add(
options.get(index));
80 protected List<InputProgram> collect_programs(
final List<Integer> program_index) {
82 final List<InputProgram> input_programs =
new ArrayList<>();
84 if (program_index ==
null)
85 for (
final Map.Entry<Integer, InputProgram> program :
programs.entrySet())
86 input_programs.add(
programs.get(program.getKey()));
88 for (
final int index : program_index)
89 input_programs.add(
programs.get(index));
90 return input_programs;
144 boolean result =
false;
146 if (entry.getValue().equals(o)) {
147 options.remove(entry.getKey());
165 boolean result =
false;
167 if (entry.getValue().equals(p)) {
188 startAsync(c, (List<Integer>)
null, (List<Integer>)
null);
195 public void startAsync(
final Callback c,
final List<Integer> program_index,
final List<Integer> option_index) {
201 return startSync((List<Integer>)
null, (List<Integer>)
null);
210 public Output startSync(
final List<Integer> program_index,
final List<Integer> option_index) {