protected SimpleConfigurationNode getChild(Object key, boolean attach) { SimpleConfigurationNode child = value.getChild(key); if (child == null) { // Does not currently exist! if (attach) { attachIfNecessary(); SimpleConfigurationNode existingChild = value.putChildIfAbsent(key, (child = createNode(key))); if (existingChild != null) { child = existingChild; } else { attachChild(child); } } else { child = createNode(key); } } return child; }
newChild.attached = true; newChild.setValue(ent.getValue()); SimpleConfigurationNode existing = newValue.putChildIfAbsent(ent.getKey(), newChild); if (existing != null) { existing.mergeValuesFrom(newChild);
SimpleConfigurationNode oldChild = newValue.putChildIfAbsent(child.key, child); if (oldChild != null) { return oldChild;
/** * Gets a child node, relative to this. * * @param key The key * @param attach If the resultant node should be automatically attached * @return The child node */ protected SimpleConfigurationNode getChild(Object key, boolean attach) { SimpleConfigurationNode child = value.getChild(key); // child doesn't currently exist if (child == null) { if (attach) { // attach ourselves first attachIfNecessary(); // insert the child node into the value SimpleConfigurationNode existingChild = value.putChildIfAbsent(key, (child = createNode(key))); if (existingChild != null) { child = existingChild; } else { attachChild(child); } } else { // just create a new virtual (detached) node child = createNode(key); } } return child; }
newChild.setValue(ent.getValue()); SimpleConfigurationNode existing = newValue.putChildIfAbsent(ent.getKey(), newChild);
newChild.setValue(ent.getValue()); SimpleConfigurationNode existing = newValue.putChildIfAbsent(ent.getKey(), newChild);
/** * Gets a child node, relative to this. * * @param key The key * @param attach If the resultant node should be automatically attached * @return The child node */ protected SimpleConfigurationNode getChild(Object key, boolean attach) { SimpleConfigurationNode child = value.getChild(key); // child doesn't currently exist if (child == null) { if (attach) { // attach ourselves first attachIfNecessary(); // insert the child node into the value SimpleConfigurationNode existingChild = value.putChildIfAbsent(key, (child = createNode(key))); if (existingChild != null) { child = existingChild; } else { attachChild(child); } } else { // just create a new virtual (detached) node child = createNode(key); } } return child; }
SimpleConfigurationNode oldChild = newValue.putChildIfAbsent(child.key, child); if (oldChild != null) { return oldChild;
SimpleConfigurationNode oldChild = newValue.putChildIfAbsent(child.key, child); if (oldChild != null) { return oldChild;