/** * Set the value of a property */ void setProperty(PropertyState property) { String name = property.getName(); checkValidName(name); properties.put(name, property); }
/** * Set the value of a property */ void setProperty(PropertyState property) { String name = property.getName(); checkValidName(name); properties.put(name, property); }
/** * Equivalent to * <pre> * MutableNodeState child = getChildNode(name, true); * child.reset(state); * return child; * </pre> * * @throws IllegalArgumentException if the given name string is empty * or contains the forward slash character */ @NotNull MutableNodeState setChildNode(String name, NodeState state) throws IllegalArgumentException { assert base != null; MutableNodeState child = nodes.get(name); if (child == null) { checkValidName(name); child = new MutableNodeState(state); if (base.hasChildNode(name)) { child.replaced = true; } nodes.put(name, child); } else { child.replaced = true; child.reset(state); } return child; }
/** * Equivalent to * <pre> * MutableNodeState child = getChildNode(name, true); * child.reset(state); * return child; * </pre> * * @throws IllegalArgumentException if the given name string is empty * or contains the forward slash character */ @Nonnull MutableNodeState setChildNode(String name, NodeState state) throws IllegalArgumentException { assert base != null; MutableNodeState child = nodes.get(name); if (child == null) { checkValidName(name); child = new MutableNodeState(state); if (base.hasChildNode(name)) { child.replaced = true; } nodes.put(name, child); } else { child.replaced = true; child.reset(state); } return child; }