Class TreeNode.Builder<S extends Script>

java.lang.Object
net.botwithus.rs3.btree.TreeNode.Builder<S>
Type Parameters:
S -
Enclosing class:
TreeNode<S extends Script>

public static class TreeNode.Builder<S extends Script> extends Object
A builder for a tree node
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • predicate

      public TreeNode.Builder<S> predicate(Predicate<S> predicate)
      Set the predicate for the node
      Parameters:
      predicate - the predicate
      Returns:
      the builder
    • success

      public TreeNode.Builder<S> success(TreeNode<S> left)
      Set the success node for the node
      Parameters:
      left - the success node
      Returns:
      the builder
    • failure

      public TreeNode.Builder<S> failure(TreeNode<S> right)
      Set the failure node for the node
      Parameters:
      right - the failure node
      Returns:
      the builder
    • listener

      public TreeNode.Builder<S> listener(TreeNodePredicateListener<S> listener)
      Set the listener for the node
      Parameters:
      listener - the listener
      Returns:
      the builder
    • skin

      public TreeNode.Builder<S> skin(TreeNodeSkin skin)
      Set the skin for the node
      Parameters:
      skin - the skin
      Returns:
      the builder
    • build

      public TreeNode<S> build()
      Build the node
      Returns:
      the node