/** * Returns the serialized representation of the given node. * <p> * Declared static, instead of InnerNode member, to avoid a public 0-arg method with a commonly used name. * * @param node The inner node * @return a list of strings, containing the serialized representation of this config */ public static List<String> serialize(InnerNode node) { List<String> ret = new ArrayList<>(); for (Map.Entry<String, LeafNode<?>> entry : getAllDescendantLeafNodes(node).entrySet()) { ret.add(entry.getKey() + " " + entry.getValue().toString()); } return ret; }