Class NodeBuilderTree

  • All Implemented Interfaces:
    Tree

    public final class NodeBuilderTree
    extends AbstractMutableTree
    A mutable Tree implementation based on an underlying NodeBuilder, which tracks all changes recorded through this tree's mutator methods.
    • Constructor Detail

      • NodeBuilderTree

        public NodeBuilderTree​(@NotNull
                               @NotNull java.lang.String name,
                               @NotNull
                               @NotNull NodeBuilder nodeBuilder)
        Create a new AbstractTree instance
        Parameters:
        nodeBuilder - NodeBuilder for the underlying node state
        name - name of the tree
      • NodeBuilderTree

        protected NodeBuilderTree​(@Nullable
                                  @Nullable NodeBuilderTree parent,
                                  @NotNull
                                  @NotNull NodeBuilder nodeBuilder,
                                  @NotNull
                                  @NotNull java.lang.String name)
    • Method Detail

      • getName

        @NotNull
        public @NotNull java.lang.String getName()
        Returns:
        the name of this Tree instance.
      • createChild

        @NotNull
        protected @NotNull NodeBuilderTree createChild​(@NotNull
                                                       @NotNull java.lang.String name)
                                                throws java.lang.IllegalArgumentException
        Description copied from class: AbstractTree
        Factory method for creating child trees
        Specified by:
        createChild in class AbstractTree
        Parameters:
        name - name of the child tree
        Returns:
        child tree of this tree with the given name
        Throws:
        java.lang.IllegalArgumentException - if the given name string is empty or contains the forward slash character