Last active
July 31, 2020 00:34
-
-
Save andrealaforgia/80ed8d0cf3640bf83ff1b9fc8a18e03d to your computer and use it in GitHub Desktop.
A generic BinaryTree class
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class BinaryTree<T> { | |
public static<T> BinaryTree<T> newTerminalNode(T nodeValue) { | |
throw new UnsupportedOperationException(); | |
} | |
public static<T> BinaryTree<T> newNonTerminalNode(BinaryTree<T> leftTree, BinaryTree<T> rightTree) { | |
throw new UnsupportedOperationException(); | |
} | |
public void visit(Consumer<BinaryTree<T>> consumer) { | |
throw new UnsupportedOperationException(); | |
} | |
public boolean isTerminalNode() { | |
throw new UnsupportedOperationException(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment