private Option lookup(String name, EList<Option> options) { for (Option opt : options) { if (opt.getName().equals(name)) { return opt; } } return null; }
public int getIs(EList<Option> options) { Option opt = lookup("is", options); if (opt == null) return is; int value = opt.getValue(); if (value >= 0) { return value; } return -leftMargin; }
private int lookup(String name, EList<Option> options, int def) { Option opt = lookup(name, options); if (opt != null) return opt.getValue(); return def; }