@Override @NotNull public NodeState getBaseState() { return base(); }
@Override @Nonnull public NodeState getBaseState() { return base(); }
/** * Update the base state of this builder by recursively retrieving it * from its parent builder. * @return base state of this builder */ @Nonnull private NodeState base() { if (rootBuilder.baseRevision != baseRevision) { base = parent.base().getChildNode(name); baseRevision = rootBuilder.baseRevision; } return base; }
/** * Update the base state of this builder by recursively retrieving it * from its parent builder. * @return base state of this builder */ @NotNull private NodeState base() { if (rootBuilder.baseRevision != baseRevision) { base = parent.base().getChildNode(name); baseRevision = rootBuilder.baseRevision; } return base; }
/** * Creates a new in-memory child builder. * @param parent parent builder * @param name name of this node */ protected MemoryNodeBuilder(MemoryNodeBuilder parent, String name) { this.parent = parent; this.name = name; this.rootBuilder = parent.rootBuilder; this.base = parent.base().getChildNode(name); this.baseRevision = parent.baseRevision; this.rootHead = parent.rootHead; this.head = new UnconnectedHead(this, base); }
/** * Creates a new in-memory child builder. * @param parent parent builder * @param name name of this node */ protected MemoryNodeBuilder(MemoryNodeBuilder parent, String name) { this.parent = parent; this.name = name; this.rootBuilder = parent.rootBuilder; this.base = parent.base().getChildNode(name); this.baseRevision = parent.baseRevision; this.rootHead = parent.rootHead; this.head = new UnconnectedHead(this, base); }