Exemple #1
0
 @Override
 public void remove(String name) throws PresetNotFoundException {
   for (Preset preset : list)
     if (preset.name().equalsIgnoreCase(name)) {
       list.remove(preset);
       return;
     }
   throw new PresetNotFoundException("Preset.id(" + name + ") not found");
 }
Exemple #2
0
 @Override
 public List<String> list() {
   List<String> names = new ArrayList<String>();
   for (Preset preset : list) names.add(preset.name());
   return names;
 }
Exemple #3
0
 @Override
 public void put(Preset preset) {
   int index = find(preset.name());
   if (index >= 0) list.remove(index);
   list.add(preset);
 }
 @Override
 public Dataset build(
     Preset preset, String datasetName, Selection columnSelection, Selection rowSelection)
     throws PresetException {
   return build(preset.descriptor(), datasetName, columnSelection, rowSelection);
 }