Package org.apache.solr.common
Interface ConfigNode
- 
 public interface ConfigNodeA generic interface that represents a config file, mostly XML Please note that this is an immutable, read-only object.
- 
- 
Nested Class SummaryNested Classes Modifier and Type Interface Description static classConfigNode.Helpers
 - 
Field SummaryFields Modifier and Type Field Description static ConfigNodeEMPTYAn empty node object.static ThreadLocal<Function<String,String>>SUBSTITUTES
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default Stringattr(String name)default Stringattr(String name, String def)Map<String,String>attributes()Attributesdefault booleanboolAttr(String name, boolean def)default booleanboolVal(boolean def)default ConfigNodechild(String name)Child by namedefault ConfigNodechild(String name, Supplier<RuntimeException> err)default ConfigNodechild(Predicate<ConfigNode> test, String name)Iterate through child nodes with the name and return the first child that matchesdefault doubledoubleVal(double def)default booleanexists()voidforEachChild(Function<ConfigNode,Boolean> fun)abortable iterate through childrendefault ConfigNodeget(String name)Child by name or return an empty node if null.default ConfigNodeget(String name, int idx)default ConfigNodeget(String name, Predicate<ConfigNode> test)default List<ConfigNode>getAll(String name)default List<ConfigNode>getAll(Predicate<ConfigNode> test, String... nodeNames)Iterate through child nodes with the names and return all the matching childrendefault List<ConfigNode>getAll(Predicate<ConfigNode> test, Set<String> matchNames)Iterate through child nodes with the names and return all the matching childrendefault intintAttr(String name, int def)default intintVal(int def)default booleanisNull()Stringname()Name of the tagdefault StringrequiredStrAttr(String name, Supplier<RuntimeException> err)Stringtxt()default Stringtxt(String def)
 
- 
- 
- 
Field Detail- 
SUBSTITUTESstatic final ThreadLocal<Function<String,String>> SUBSTITUTES 
 - 
EMPTYstatic final ConfigNode EMPTY An empty node object. usually returned when the node is absent
 
- 
 - 
Method Detail- 
nameString name() Name of the tag
 - 
childdefault ConfigNode child(String name) Child by name
 - 
getdefault ConfigNode get(String name) Child by name or return an empty node if null. If there are multiple values, it returns the first element. This never returns a null.
 - 
getdefault ConfigNode get(String name, Predicate<ConfigNode> test) 
 - 
getdefault ConfigNode get(String name, int idx) 
 - 
childdefault ConfigNode child(String name, Supplier<RuntimeException> err) 
 - 
boolValdefault boolean boolVal(boolean def) 
 - 
intValdefault int intVal(int def) 
 - 
requiredStrAttrdefault String requiredStrAttr(String name, Supplier<RuntimeException> err) 
 - 
intAttrdefault int intAttr(String name, int def) 
 - 
boolAttrdefault boolean boolAttr(String name, boolean def) 
 - 
txtString txt() 
 - 
doubleValdefault double doubleVal(double def) 
 - 
childdefault ConfigNode child(Predicate<ConfigNode> test, String name) Iterate through child nodes with the name and return the first child that matches
 - 
getAlldefault List<ConfigNode> getAll(Predicate<ConfigNode> test, String... nodeNames) Iterate through child nodes with the names and return all the matching children- Parameters:
- nodeNames- names of tags to be returned
- test- check for the nodes to be returned
 
 - 
getAlldefault List<ConfigNode> getAll(Predicate<ConfigNode> test, Set<String> matchNames) Iterate through child nodes with the names and return all the matching children- Parameters:
- matchNames- names of tags to be returned
- test- check for the nodes to be returned
 
 - 
getAlldefault List<ConfigNode> getAll(String name) 
 - 
existsdefault boolean exists() 
 - 
isNulldefault boolean isNull() 
 - 
forEachChildvoid forEachChild(Function<ConfigNode,Boolean> fun) abortable iterate through children- Parameters:
- fun- consume the node and return true to continue or false to abort
 
 
- 
 
-