Package org.apache.solr.common

## Interface ConfigNode

    public interface ConfigNode

A generic interface that represents a config file, mostly XML Please note that this is an immutable, read-only object.

### Nested Class Summary

Nested Classes
`static class` `ConfigNode.Helpers`

### Field Summary

Fields
`static ConfigNode` `EMPTY` An empty node object.
`static SimpleMap<String>` `empty_attrs`
`static ThreadLocal<Function<String,​String>>` `SUBSTITUTES`

### Method Summary

All Methods Instance Methods Abstract Methods Default Methods
`default String` `attr​(String name)`
`default String` `attr​(String name, String def)`
`SimpleMap<String>` `attributes()` Attributes
`default boolean` `boolAttr​(String name, boolean def)`
`default boolean` `boolVal​(boolean def)`
`default ConfigNode` `child​(String name)` Child by name
`default ConfigNode` `child​(String name, Supplier<RuntimeException> err)`
`default ConfigNode` `child​(Predicate<ConfigNode> test, String name)` Iterate through child nodes with the name and return the first child that matches
`default double` `doubleVal​(double def)`
`default boolean` `exists()`
`void` `forEachChild​(Function<ConfigNode,​Boolean> fun)` abortable iterate through children
`default ConfigNode` `get​(String name)` Child by name or return an empty node if null if there are multiple values , it returns the first elem This never returns a null
`default ConfigNode` `get​(String name, int idx)`
`default ConfigNode` `get​(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 children
`default List<ConfigNode>` `getAll​(Predicate<ConfigNode> test, Set<String> matchNames)` Iterate through child nodes with the names and return all the matching children
`default int` `intAttr​(String name, int def)`
`default int` `intVal​(int def)`
`default boolean` `isNull()`
`String` `name()` Name of the tag
`default String` `requiredStrAttr​(String name, Supplier<RuntimeException> err)`
`String` `txt()`
`default String` `txt​(String def)`

### Field Detail

#### SUBSTITUTES

    static final ThreadLocal<Function<String,​String>> SUBSTITUTES

#### EMPTY

    static final ConfigNode EMPTY

An empty node object. usually returned when the node is absent

#### empty_attrs

    static final SimpleMap<String> empty_attrs

### Method Detail

#### name

    String name()

Name of the tag

#### attributes

    SimpleMap<String> attributes()

Attributes

#### child

    default ConfigNode child​(String name)

Child by name

#### get

    default ConfigNode get​(String name)

Child by name or return an empty node if null if there are multiple values , it returns the first elem This never returns a null

#### get

    default ConfigNode get​(String name,
                           Predicate<ConfigNode> test)

#### get

    default ConfigNode get​(String name,
                           int idx)

#### child

    default ConfigNode child​(String name,
                             Supplier<RuntimeException> err)

#### boolVal

    default boolean boolVal​(boolean def)

#### intVal

    default int intVal​(int def)

#### attr

    default String attr​(String name,
                        String def)

#### attr

    default String attr​(String name)

#### requiredStrAttr

    default String requiredStrAttr​(String name,
                                   Supplier<RuntimeException> err)

#### intAttr

    default int intAttr​(String name,
                        int def)

#### boolAttr

    default boolean boolAttr​(String name,
                             boolean def)

#### txt

    default String txt​(String def)

#### txt

    String txt()

#### doubleVal

    default double doubleVal​(double def)

#### child

    default ConfigNode child​(Predicate<ConfigNode> test,
                             String name)

Iterate through child nodes with the name and return the first child that matches

#### getAll

    default 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

#### getAll

    default 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

#### getAll

    default List<ConfigNode> getAll​(String name)

#### exists

    default boolean exists()

#### isNull

    default boolean isNull()

#### forEachChild

    void forEachChild​(Function<ConfigNode,​Boolean> fun)

abortable iterate through children

Parameters:
  `fun` - consume the node and return true to continue or false to abort