/** * Creates a new instance of {@code SubnodeConfiguration} and * initializes it with the parent configuration and the new root node. * * @param parent the parent configuration * @param root the root node of this subnode configuration */ public SubnodeConfiguration(HierarchicalConfiguration parent, ConfigurationNode root) { super(parent instanceof Reloadable ? ((Reloadable) parent).getReloadLock() : null); if (parent == null) { throw new IllegalArgumentException( "Parent configuration must not be null!"); } if (root == null) { throw new IllegalArgumentException("Root node must not be null!"); } setRootNode(root); this.parent = parent; initFromParent(parent); }
/** * Creates a new instance of {@code SubnodeConfiguration} and * initializes it with the parent configuration and the new root node. * * @param parent the parent configuration * @param root the root node of this subnode configuration */ public SubnodeConfiguration(HierarchicalConfiguration parent, ConfigurationNode root) { super(parent instanceof Reloadable ? ((Reloadable) parent).getReloadLock() : null); if (parent == null) { throw new IllegalArgumentException( "Parent configuration must not be null!"); } if (root == null) { throw new IllegalArgumentException("Root node must not be null!"); } setRootNode(root); this.parent = parent; initFromParent(parent); }