package net.acomputerdog.core.tree;

/**
 * A "leaf" on a tree.  A leaf is a branch that has data and no children
 *
 * @param <T>
 */
public class Leaf<T> {
    /**
     * Thee data on this leaf
     */
    private T item;

    /**
     * The branch that this leaf is on
     */
    private final Branch branch;

    /**
     * Creates a new Leaf
     * @param branch The branch that this leaf is attached to
     * @param item The item this leaf holds
     */
    public Leaf(Branch branch, T item) {
        this.branch = branch;
        this.item = item;
    }

    /**
     * Creates a new leaf with no item
     *
     * @param branch The branch that this leaf is attached to
     */
    public Leaf(Branch branch) {
        this(branch, null);
    }

    /**
     * Gets the item held by this leaf
     * @return return the item
     */
    public T getItem() {
        return item;
    }

    /**
     * Sets the item held by this leaf
     * @param item Set the item
     */
    public void setItem(T item) {
        this.item = item;
    }

    /**
     * Gets the branch this leaf is on
     * @return return the branch of this leaf
     */
    public Branch getBranch() {
        return branch;
    }
}

@@ -293,24 +293,27 @@
 final Branch
+%3CT%3E
  branch;%0A%0A  
@@ -476,24 +476,27 @@
  Leaf(Branch
+%3CT%3E
  branch, T i
@@ -711,16 +711,19 @@
 f(Branch
+%3CT%3E
  branch)
@@ -1171,16 +1171,19 @@
 c Branch
+%3CT%3E
  getBran

Add generics to branches in Leaf