Lines Matching defs:SimpleNode
38 static final class SimpleNode extends BstNode<Character, SimpleNode> {
39 SimpleNode(Character key, @Nullable SimpleNode left, @Nullable SimpleNode right) {
50 if (obj instanceof SimpleNode) {
51 SimpleNode node = (SimpleNode) obj;
65 static final BstNodeFactory<SimpleNode> nodeFactory = new BstNodeFactory<SimpleNode>() {
67 public SimpleNode createNode(
68 SimpleNode source, @Nullable SimpleNode left, @Nullable SimpleNode right) {
69 return new SimpleNode(source.getKey(), left, right);
73 static final BstBalancePolicy<SimpleNode> balancePolicy = new BstBalancePolicy<SimpleNode>() {
75 public SimpleNode balance(BstNodeFactory<SimpleNode> nodeFactory, SimpleNode source,
76 @Nullable SimpleNode left, @Nullable SimpleNode right) {
82 public SimpleNode combine(BstNodeFactory<SimpleNode> nodeFactory, @Nullable SimpleNode left,
83 @Nullable SimpleNode right) {
98 static final BstPathFactory<SimpleNode, BstInOrderPath<SimpleNode>> pathFactory =
102 static final BstAggregate<SimpleNode> countAggregate = new BstAggregate<SimpleNode>() {
104 public int entryValue(SimpleNode entry) {
109 public long treeValue(@Nullable SimpleNode tree) {
118 static <P extends BstPath<SimpleNode, P>> List<SimpleNode> pathToList(P path) {
119 List<SimpleNode> list = Lists.newArrayList();
135 static void assertInOrderTraversalIs(@Nullable SimpleNode root, String order) {
139 BstInOrderPath<SimpleNode> path = pathFactory.initialPath(root);
162 SimpleNode node = new SimpleNode('a', null, null);
173 BstModifier<Character, SimpleNode> modifier = new BstModifier<Character, SimpleNode>() {
176 public BstModificationResult<SimpleNode> modify(
177 Character key, @Nullable SimpleNode originalEntry) {
182 BstModificationResult.class, BstModificationResult.<SimpleNode>identity(null));