- Sort Score
- Result 10 results
- Languages All
Results 1 - 6 of 6 for onlyElement (0.18 sec)
-
android/guava/src/com/google/common/collect/MoreCollectors.java
* more elements, and a {@code NoSuchElementException} if the stream is empty. */ @SuppressWarnings("unchecked") public static <T extends @Nullable Object> Collector<T, ?, T> onlyElement() { return (Collector) ONLY_ELEMENT; } /** * This atrocity is here to let us report several of the elements in the stream if there were more * than one, not just two. */
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Sun Jun 02 13:36:19 UTC 2024 - 5.7K bytes - Viewed (0) -
platforms/core-execution/snapshots/src/main/java/org/gradle/internal/snapshot/SearchUtil.java
int size = sortedElements.size(); switch (size) { case 0: return -1; case 1: T onlyElement = sortedElements.get(0); int comparedToSearch = key.compareTo(onlyElement); return comparedToSearch == 0 ? 0 : comparedToSearch < 0 ? -1 : -2;
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Fri Sep 22 09:34:50 UTC 2023 - 2.7K bytes - Viewed (0) -
guava/src/com/google/common/collect/MoreCollectors.java
* more elements, and a {@code NoSuchElementException} if the stream is empty. */ @SuppressWarnings("unchecked") public static <T extends @Nullable Object> Collector<T, ?, T> onlyElement() { return (Collector) ONLY_ELEMENT; } /** * This atrocity is here to let us report several of the elements in the stream if there were more * than one, not just two. */
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Tue Dec 13 02:09:05 UTC 2022 - 5.4K bytes - Viewed (0) -
guava/src/com/google/common/collect/ImmutableList.java
* `length` array elements. */ @SuppressWarnings("unchecked") // our callers put only E instances into the array E onlyElement = (E) requireNonNull(elements[0]); return of(onlyElement); default: /* * The suppression is safe because the callers promise to put non-null objects in the first * `length` array elements. */
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Wed May 08 03:01:02 UTC 2024 - 29.9K bytes - Viewed (0) -
guava/src/com/google/common/collect/Iterables.java
} /** * Returns the single element contained in {@code iterable}. * * <p><b>Java 8+ users:</b> the {@code Stream} equivalent to this method is {@code * stream.collect(MoreCollectors.onlyElement())}. * * @throws NoSuchElementException if the iterable is empty * @throws IllegalArgumentException if the iterable contains multiple elements */ @ParametricNullness
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Wed Apr 24 19:38:27 UTC 2024 - 42.5K bytes - Viewed (0) -
android/guava/src/com/google/common/collect/Iterables.java
} /** * Returns the single element contained in {@code iterable}. * * <p><b>Java 8+ users:</b> the {@code Stream} equivalent to this method is {@code * stream.collect(MoreCollectors.onlyElement())}. * * @throws NoSuchElementException if the iterable is empty * @throws IllegalArgumentException if the iterable contains multiple elements */ @ParametricNullness
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Wed Apr 24 19:38:27 UTC 2024 - 42.8K bytes - Viewed (0)