/external/guava/guava/src/com/google/common/collect/ |
D | BstOperations.java | 94 BstBalancePolicy<N> balancePolicy = mutationRule.getBalancePolicy(); in mutate() local 103 result = result.lift(prefix.getTip(), path.getSideOfExtension(), nodeFactory, balancePolicy); in mutate() 163 N root, BstNodeFactory<N> nodeFactory, BstBalancePolicy<N> balancePolicy) { in extractMin() argument 166 checkNotNull(balancePolicy); in extractMin() 169 extractMin(root.getChild(LEFT), nodeFactory, balancePolicy); in extractMin() 170 return subResult.lift(root, LEFT, nodeFactory, balancePolicy); in extractMin() 181 N root, BstNodeFactory<N> nodeFactory, BstBalancePolicy<N> balancePolicy) { in extractMax() argument 184 checkNotNull(balancePolicy); in extractMax() 187 extractMax(root.getChild(RIGHT), nodeFactory, balancePolicy); in extractMax() 188 return subResult.lift(root, RIGHT, nodeFactory, balancePolicy); in extractMax() [all …]
|
D | BstMutationRule.java | 38 BstModifier<K, N> modifier, BstBalancePolicy<N> balancePolicy, in createRule() argument 40 return new BstMutationRule<K, N>(modifier, balancePolicy, nodeFactory); in createRule() 44 private final BstBalancePolicy<N> balancePolicy; field in BstMutationRule 47 private BstMutationRule(BstModifier<K, N> modifier, BstBalancePolicy<N> balancePolicy, in BstMutationRule() argument 49 this.balancePolicy = checkNotNull(balancePolicy); in BstMutationRule() 67 return balancePolicy; in getBalancePolicy()
|
D | BstRangeOps.java | 77 BstBalancePolicy<N> balancePolicy, BstNodeFactory<N> nodeFactory, @Nullable N root) { in minusRange() argument 79 checkNotNull(balancePolicy); in minusRange() 82 ? subTreeBeyondRangeToSide(range, balancePolicy, nodeFactory, RIGHT, root) in minusRange() 85 ? subTreeBeyondRangeToSide(range, balancePolicy, nodeFactory, LEFT, root) in minusRange() 87 return balancePolicy.combine(nodeFactory, lower, higher); in minusRange() 96 BstBalancePolicy<N> balancePolicy, BstNodeFactory<N> nodeFactory, BstSide side, in subTreeBeyondRangeToSide() argument 106 right = subTreeBeyondRangeToSide(range, balancePolicy, nodeFactory, LEFT, right); in subTreeBeyondRangeToSide() 109 left = subTreeBeyondRangeToSide(range, balancePolicy, nodeFactory, RIGHT, left); in subTreeBeyondRangeToSide() 114 return balancePolicy.balance(nodeFactory, root, left, right); in subTreeBeyondRangeToSide() 117 range, balancePolicy, nodeFactory, side, root.childOrNull(side)); in subTreeBeyondRangeToSide()
|
D | BstMutationResult.java | 124 BstNodeFactory<N> nodeFactory, BstBalancePolicy<N> balancePolicy) { in lift() argument 125 assert liftOriginalRoot != null & side != null & nodeFactory != null & balancePolicy != null; in lift() 149 balancePolicy.balance(nodeFactory, liftOriginalRoot, resultLeft, resultRight); in lift()
|
/external/guava/guava-tests/test/com/google/common/collect/ |
D | BstOperationsTest.java | 19 import static com.google.common.collect.BstTesting.balancePolicy; 104 BstBalancePolicy<SimpleNode> balancePolicy = EasyMock.createStrictMock(BstBalancePolicy.class); in testModifyInsertAbsentNode() local 111 expect(balancePolicy.balance( in testModifyInsertAbsentNode() 118 expect(balancePolicy.balance( in testModifyInsertAbsentNode() 125 balancePolicy.balance(same(nodeFactory), withKey('d'), same(bWithC), same(f))) in testModifyInsertAbsentNode() 127 replay(nodeFactory, balancePolicy, modifier); in testModifyInsertAbsentNode() 129 BstMutationRule.createRule(modifier, balancePolicy, nodeFactory); in testModifyInsertAbsentNode() 141 verify(nodeFactory, balancePolicy, modifier); in testModifyInsertAbsentNode() 160 BstBalancePolicy<SimpleNode> balancePolicy = EasyMock.createStrictMock(BstBalancePolicy.class); in testModifyInsertPresentNode() local 166 replay(nodeFactory, balancePolicy, modifier); in testModifyInsertPresentNode() [all …]
|
D | BstTesting.java | 73 static final BstBalancePolicy<SimpleNode> balancePolicy = new BstBalancePolicy<SimpleNode>() { field in BstTesting 166 tester.setDefault(BstBalancePolicy.class, balancePolicy); in defaultNullPointerTester() 185 BstMutationRule.class, BstMutationRule.createRule(modifier, balancePolicy, nodeFactory)); in defaultNullPointerTester()
|
D | BstRangeOpsTest.java | 22 import static com.google.common.collect.BstTesting.balancePolicy; 238 BstRangeOps.minusRange(range, balancePolicy, nodeFactory, d), expected); in testTraversalAfterClearingRangeIs()
|