- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for mapToLong (0.11 sec)
-
guava/src/com/google/common/util/concurrent/AtomicLongMap.java
/** * Returns the sum of all values in this map. * * <p>This method is not atomic: the sum may or may not include other concurrent operations. */ public long sum() { return map.values().stream().mapToLong(Long::longValue).sum(); } @LazyInit @CheckForNull private transient Map<K, Long> asMap; /** Returns a live, read-only view of the map backing this {@code AtomicLongMap}. */ public Map<K, Long> asMap() {
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Mon Apr 01 16:15:01 UTC 2024 - 11.8K bytes - Viewed (0) -
subprojects/core/src/main/java/org/gradle/execution/plan/DefaultPlanExecutor.java
completedWorkers.clear(); } private String format(ToLongFunction<CollectingWorkerStats> statsProperty) { BigDecimal averageNanos = BigDecimal.valueOf(completedWorkers.stream().mapToLong(statsProperty).sum() / completedWorkers.size()); return DecimalFormat.getNumberInstance().format(averageNanos.divide(BigDecimal.valueOf(1000000), RoundingMode.HALF_UP)) + "ms"; } }
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Fri Apr 05 16:29:26 UTC 2024 - 29.1K bytes - Viewed (0) -
guava/src/com/google/common/primitives/ImmutableLongArray.java
* <li>Can be queried without allocating garbage. * <li>Access to {@code LongStream} features (like {@link LongStream#sum}) using {@code stream()} * instead of the awkward {@code stream().mapToLong(v -> v)}. * </ul> * * <p>Disadvantages compared to {@code ImmutableList<Long>}: * * <ul> * <li>Can't be passed directly to methods that expect {@code Iterable}, {@code Collection}, or
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Fri May 12 16:34:24 UTC 2023 - 21K bytes - Viewed (0)