data-structures/java/BinaryTree/BinNode.java

18 lines
356 B
Java
Raw Normal View History

2022-09-17 04:34:51 +00:00
/** ADT for binary tree nodes */
public interface BinNode<E> {
/** Get and set the element value */
public E element();
public void setElement(E v);
/** @return The left child */
public BinNode<E> left();
/** @return The right child */
public BinNode<E> right();
/** @return True if a leaf node, false otherwise */
public boolean isLeaf();
}