/libcore/ojluni/src/test/java/util/stream/bootlib/java/util/stream/ |
H A D | LambdaTestHelpers.java | 184 public static void assertCountSum(Stream<? super Integer> it, int count, int sum) { argument 185 assertCountSum(it.iterator(), count, sum); 188 public static void assertCountSum(Iterable<? super Integer> it, int count, int sum) { argument 189 assertCountSum(it.iterator(), count, sum); 192 public static void assertCountSum(Iterator<? super Integer> it, int count, int sum) { argument 202 assertEquals(s, sum);
|
/libcore/ojluni/src/test/java/util/stream/testlib/org/openjdk/testlib/java/util/stream/ |
H A D | LambdaTestHelpers.java | 185 public static void assertCountSum(Stream<? super Integer> it, int count, int sum) { argument 186 assertCountSum(it.iterator(), count, sum); 189 public static void assertCountSum(Iterable<? super Integer> it, int count, int sum) { argument 190 assertCountSum(it.iterator(), count, sum); 193 public static void assertCountSum(Iterator<? super Integer> it, int count, int sum) { argument 203 assertEquals(s, sum);
|
/libcore/ojluni/src/test/java/util/stream/test/org/openjdk/tests/java/util/stream/ |
H A D | ForEachOpTest.java | 68 AtomicInteger sum = new AtomicInteger(0); 69 s.forEach(sum::addAndGet); 70 return sum.get();
|
H A D | RangeTest.java | 133 terminal(s -> s.reduce(0, Integer::sum)).exercise(); 139 terminal(s -> s.reduce(0, Integer::sum)).exercise(); 216 terminal(s -> s.reduce(0, Long::sum)).exercise(); 222 terminal(s -> s.reduce(0, Long::sum)).exercise();
|
H A D | ReduceByOpTest.java | 62 Map<Integer, Integer> miResult = exerciseTerminalOps(data, s -> s.collect(groupingBy(mId, reducing(0, e -> 1, Integer::sum))));
|
/libcore/ojluni/src/main/java/sun/misc/ |
H A D | FDBigInteger.java | 53 @ return (\sum int i; 0 <= 0 && i < len; UNSIGNED(data[i]) << (i*32)); 205 @ ensures this.value() == \old(lValue * pow10(nDigits - kDigits) + (\sum int i; kDigits <= i && i < nDigits; (digits[i] - '0') * pow10(nDigits - i - 1))); 596 long sum = 0L; 601 while (sum == 0L) { 603 sum += (td[tIndex] & LONG_MASK) + (sd[sIndex] & LONG_MASK); 604 td[tIndex] = (int) sum; 605 sum >>>= 32; // Signed or unsigned, answer is 0 or 1 609 // "if ( sum !=0 && sum != -1 )" 615 assert sum [all...] |
/libcore/ojluni/src/test/java/util/stream/ |
H A D | TestDoubleSumAverage.java | 33 * @summary Test for use of non-naive summation in stream-related sum and average operations. 58 * Compute the sum and average of a sequence of double values in 65 * The exact sum of the test stream is 1 + 1e6*ulp(1.0) but a 87 ds.get().sum(), 3); 135 failures += compareUlpDifference(expected, ds.get().sum(), 0); 154 System.err.printf("Unexpected sum, %g rather than %g.%n",
|
/libcore/ojluni/src/main/java/java/util/stream/ |
H A D | LongPipeline.java | 395 public final long sum() { method in class:LongPipeline 397 return reduce(0, Long::sum); 428 return map(e -> 1L).sum();
|
H A D | DoubleStream.java | 56 * {@link Stream} and {@link DoubleStream}, computing the sum of the weights of the 60 * double sum = widgets.stream() 63 * .sum(); 214 * .sum(); 350 * double sum = numbers.reduce(0, (a, b) -> a+b); 356 * double sum = numbers.reduce(0, Double::sum); 370 * @see #sum() 456 * Returns the sum of elements in this stream. 464 * return reduce(0, Double::sum); 494 double sum(); method in interface:DoubleStream [all...] |
H A D | IntPipeline.java | 414 public final int sum() { method in class:IntPipeline 415 return reduce(0, Integer::sum); 430 return mapToLong(e -> 1L).sum();
|
H A D | DoublePipeline.java | 380 public final double sum() { method in class:DoublePipeline 383 * holds the high-order bits of the running sum, index 1 holds 384 * the low-order bits of the sum computed via compensated 385 * summation, and index 2 holds the simple sum used to compute 426 * holds the high-order bits of the running sum, index 1 holds 427 * the low-order bits of the sum computed via compensated 429 * holds the simple sum. 450 return mapToLong(e -> 1L).sum();
|
H A D | Collectors.java | 80 * // Compute sum of salaries of employee 89 * // Compute sum of salaries by department 405 * reducing(0L, e -> 1L, Long::sum) 413 return reducing(0L, e -> 1L, Long::sum); 455 * Returns a {@code Collector} that produces the sum of a integer-valued 461 * @return a {@code Collector} that produces the sum of a derived property 473 * Returns a {@code Collector} that produces the sum of a long-valued 479 * @return a {@code Collector} that produces the sum of a derived property 491 * Returns a {@code Collector} that produces the sum of a double-valued 495 * <p>The sum returne [all...] |
H A D | IntStream.java | 54 * {@link Stream} and {@link IntStream}, computing the sum of the weights of the 58 * int sum = widgets.stream() 61 * .sum(); 209 * .sum(); 345 * int sum = integers.reduce(0, (a, b) -> a+b); 351 * int sum = integers.reduce(0, Integer::sum); 365 * @see #sum() 450 * Returns the sum of elements in this stream. This is a special case 454 * return reduce(0, Integer::sum); 462 int sum(); method in interface:IntStream [all...] |
H A D | LongStream.java | 58 * {@link Stream} and {@link LongStream}, computing the sum of the weights of the 62 * long sum = widgets.stream() 65 * .sum(); 213 * .sum(); 349 * long sum = integers.reduce(0, (a, b) -> a+b); 355 * long sum = integers.reduce(0, Long::sum); 369 * @see #sum() 454 * Returns the sum of elements in this stream. This is a special case 458 * return reduce(0, Long::sum); 466 long sum(); method in interface:LongStream [all...] |
/libcore/luni/src/test/java/libcore/java/lang/ |
H A D | DoubleTest.java | 165 assertEquals(a + b, Double.sum(a, b));
|
H A D | FloatTest.java | 160 assertEquals(a + b, Float.sum(a, b));
|
H A D | IntegerTest.java | 154 assertEquals(a + b, Integer.sum(a, b));
|
/libcore/ojluni/src/main/java/java/lang/ |
H A D | Double.java | 1019 * @return the sum of {@code a} and {@code b} 1024 public static double sum(double a, double b) { method in class:Double
|
H A D | Float.java | 926 * @return the sum of {@code a} and {@code b} 931 public static float sum(float a, float b) { method in class:Float
|
/libcore/jsr166-tests/src/test/java/jsr166/ |
H A D | ConcurrentHashMapTest.java | 236 * hashCode() equals sum of each key.hashCode ^ value.hashCode 240 int sum = 0; 242 sum += e.getKey().hashCode() ^ e.getValue().hashCode(); 243 assertEquals(sum, map.hashCode());
|
/libcore/luni/src/test/java/tests/java/sql/ |
H A D | SelectFunctionalityTest.java | 395 String selectQuery = "SELECT rating, SUM(snum) AS sum FROM " 406 int sum = result.getInt("sum"); 409 assertEquals("Wrong value of sum field", values.get(rating), 410 new Integer(sum)); 411 assertEquals(new Integer(sum), values.remove(rating)); 481 String selectSum = "SELECT sum(onum) as sum FROM " 491 func("sum", selectSum, 30062);
|
/libcore/ojluni/src/main/java/java/util/ |
H A D | BitSet.java | 897 int sum = 0; 899 sum += Long.bitCount(words[i]); 900 return sum;
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/math/ |
H A D | BigDecimalTest.java | 187 BigDecimal sum = add1.add(add2); 188 assertTrue("the sum of 23.456 + 3849.235 is wrong", sum.unscaledValue() 190 && sum.scale() == 3); 191 assertTrue("the sum of 23.456 + 3849.235 is not printed correctly", sum 194 assertTrue("the sum of 23.456 + 12.34E02 is not printed correctly",
|
H A D | OldBigIntegerTest.java | 294 assertTrue("Incorrect sum--wanted a zillion", aZillion.add(aZillion) 318 BigInteger sum = aZillion;
|
/libcore/luni/src/test/java/libcore/java/math/ |
H A D | OldBigDecimalArithmeticTest.java | 525 BigDecimal sum = add1.add(add2); 526 assertTrue("the sum of 23.456 + 3849.235 is wrong", sum.unscaledValue().toString().equals( 528 && sum.scale() == 3); 529 assertTrue("the sum of 23.456 + 3849.235 is not printed correctly", sum.toString().equals( 532 assertTrue("the sum of 23.456 + 12.34E02 is not printed correctly", (add1.add(add3))
|