Example #1
0
 public void addList(String name, List<String> vals, String headComment, String inlineComment) {
   final GenericList list = new GenericList(name);
   list.addAll(vals);
   list.setHeaderComment(headComment);
   list.setInlineComment(inlineComment);
   addList(list);
 }
Example #2
0
  /**
   * Gets the child list with the given name.
   *
   * @param listname the name of the list to retrieve.
   * @return the named list.
   */
  public GenericList getList(String listname) {
    for (GenericList list : lists) if (list.getName().equalsIgnoreCase(listname)) return list;

    GenericObject l = getChild(listname);

    if (l == null) return null;

    if (l.allWritable
        .isEmpty()) // which means it could have been an empty list parsed as an object with no
      // children
      return convertToList(l);

    return null;
  }
Example #3
0
 public void addList(String name, List<String> vals) {
   final GenericList list = new GenericList(name);
   list.addAll(vals);
   addList(list);
 }