3 import java.util.LinkedHashMap;
8 public abstract class Compute {
10 * @return list of strings to work with
12 public abstract List<String> getData();
13 /** Computes the strings to work with together with their
14 * associated descriptions. Shall be overriden in subclasses.
15 * By default delegates to {@link #getData}
16 * and uses the provided strings as both, the string
17 * and its description.
19 * @return name to description pairs to work with
21 public Map<String,String> getDataAndDescription() {
22 LinkedHashMap<String,String> ret =
23 new LinkedHashMap<String, String>();
24 for (String s : getData()) {