@Override public boolean isModified() { return head().isModified(); }
@Override public boolean isReplaced() { return head().isReplaced(); }
@Override public boolean isReplaced(String name) { return head().isReplaced(name); }
@Override @Nullable public String getString(@NotNull String name) { return head().getCurrentNodeState().getString(checkNotNull(name)); }
@Override public boolean hasChildNode(@Nonnull String name) { return head().getCurrentNodeState().hasChildNode(checkNotNull(name)); }
@NotNull @Override public Iterable<String> getChildNodeNames() { return head().getCurrentNodeState().getChildNodeNames(); }
@NotNull @Override public Iterable<? extends PropertyState> getProperties() { return head().getCurrentNodeState().getProperties(); }
@Nonnull @Override public Iterable<String> getChildNodeNames() { return head().getCurrentNodeState().getChildNodeNames(); }
@Nonnull @Override public Iterable<? extends PropertyState> getProperties() { return head().getCurrentNodeState().getProperties(); }
@Override public long getPropertyCount() { return head().getCurrentNodeState().getPropertyCount(); }
@NotNull @Override public NodeBuilder setProperty(@NotNull PropertyState property) { checkState(exists(), "This builder does not exist: " + name); head().getMutableNodeState().setProperty(checkNotNull(property)); updated(); return this; }
@Nonnull @Override public NodeBuilder setProperty(@Nonnull PropertyState property) { checkState(exists(), "This builder does not exist: " + name); head().getMutableNodeState().setProperty(checkNotNull(property)); updated(); return this; }
@Override public boolean exists() { return head().getCurrentNodeState().exists(); }
@Override public long getPropertyCount() { return head().getCurrentNodeState().getPropertyCount(); }
@Nonnull @Override public NodeBuilder setChildNode(@Nonnull String name, @Nonnull NodeState state) { checkState(exists(), "This builder does not exist: " + this.name); head().getMutableNodeState().setChildNode(name, checkNotNull(state)); MemoryNodeBuilder builder = createChildBuilder(name); updated(); return builder; }
@NotNull @Override public NodeBuilder removeProperty(String name) { checkState(exists(), "This builder does not exist: " + name); if (head().getMutableNodeState().removeProperty(checkNotNull(name))) { updated(); } return this; }
@NotNull @Override public NodeBuilder setChildNode(@NotNull String name, @NotNull NodeState state) { checkState(exists(), "This builder does not exist: " + this.name); head().getMutableNodeState().setChildNode(name, checkNotNull(state)); MemoryNodeBuilder builder = createChildBuilder(name); updated(); return builder; }
@Nonnull @Override public NodeBuilder removeProperty(String name) { checkState(exists(), "This builder does not exist: " + name); if (head().getMutableNodeState().removeProperty(checkNotNull(name))) { updated(); } return this; }