예제 #1
0
 private Option lookup(String name, EList<Option> options) {
   for (Option opt : options) {
     if (opt.getName().equals(name)) {
       return opt;
     }
   }
   return null;
 }
예제 #2
0
 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;
 }
예제 #3
0
 private int lookup(String name, EList<Option> options, int def) {
   Option opt = lookup(name, options);
   if (opt != null) return opt.getValue();
   return def;
 }