- Sort Score
- Result 10 results
- Languages All
Results 1 - 4 of 4 for limit (0.17 sec)
-
android/guava/src/com/google/common/collect/Comparators.java
* // returns {"foo", "quux"} * }</pre> * * <p>This {@code Collector} uses O(k) memory and takes expected time O(n) (worst-case O(n log * k)), as opposed to e.g. {@code Stream.sorted(comparator).limit(k)}, which currently takes O(n * log n) time and O(n) space. * * @throws IllegalArgumentException if {@code k < 0} * @since 33.2.0 (available since 22.0 in guava-jre) */
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Wed May 01 18:44:57 GMT 2024 - 10.2K bytes - Viewed (0) -
android/guava/src/com/google/common/collect/Iterables.java
* * <p><b>{@code Stream} equivalent:</b> {@link Stream#limit} * * @param iterable the iterable to limit * @param limitSize the maximum number of elements in the returned iterable * @throws IllegalArgumentException if {@code limitSize} is negative * @since 3.0 */ public static <T extends @Nullable Object> Iterable<T> limit( final Iterable<T> iterable, final int limitSize) {
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Wed Apr 24 19:38:27 GMT 2024 - 42.8K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/collect/IteratorsTest.java
assertEquals(list, newArrayList(Iterators.limit(list.iterator(), 2))); list.add("pants"); assertFalse(Iterators.limit(list.iterator(), 0).hasNext()); assertEquals(ImmutableList.of("cool"), newArrayList(Iterators.limit(list.iterator(), 1))); assertEquals(list, newArrayList(Iterators.limit(list.iterator(), 2))); assertEquals(list, newArrayList(Iterators.limit(list.iterator(), 3)));
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Tue Apr 30 18:43:01 GMT 2024 - 56.5K bytes - Viewed (0) -
android/guava/src/com/google/common/collect/Iterators.java
* * @param iterator the iterator to limit * @param limitSize the maximum number of elements in the returned iterator * @throws IllegalArgumentException if {@code limitSize} is negative * @since 3.0 */ public static <T extends @Nullable Object> Iterator<T> limit( Iterator<T> iterator, int limitSize) { checkNotNull(iterator); checkArgument(limitSize >= 0, "limit is negative"); return new Iterator<T>() {
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Tue Apr 30 18:43:01 GMT 2024 - 51.1K bytes - Viewed (0)