Esempio n. 1
0
 @Override
 public String[] unparse(LoadContext context, BaseKit kit) {
   Collection<OptionBound> bounds = kit.getBounds();
   if (bounds == null) {
     return null;
   }
   List<String> list = new ArrayList<>();
   for (OptionBound bound : bounds) {
     Formula min = bound.getOptionMin();
     Formula max = bound.getOptionMax();
     if (min == null || max == null) {
       // Error if only one is null
       return null;
     }
     StringBuilder sb = new StringBuilder();
     sb.append(min);
     if (!min.equals(max)) {
       sb.append(',').append(max);
     }
     list.add(sb.toString());
   }
   return new String[] {StringUtil.join(list, Constants.PIPE)};
 }