Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 34 for limit (0.21 sec)

  1. 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 Apr 19 12:43:09 GMT 2024
    - Last Modified: Thu Mar 07 18:34:03 GMT 2024
    - 55.7K bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/util/concurrent/FakeTimeLimiter.java

    import java.util.concurrent.ExecutionException;
    import java.util.concurrent.TimeUnit;
    import org.checkerframework.checker.nullness.qual.Nullable;
    
    /**
     * A TimeLimiter implementation which actually does not attempt to limit time at all. This may be
     * desirable to use in some unit tests. More importantly, attempting to debug a call which is
     * time-limited would be extremely annoying, so this gives you a time-limiter you can easily swap in
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Dec 14 20:35:03 GMT 2023
    - 3.5K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/base/Splitter.java

      private final int limit;
    
      private Splitter(Strategy strategy) {
        this(strategy, false, CharMatcher.none(), Integer.MAX_VALUE);
      }
    
      private Splitter(Strategy strategy, boolean omitEmptyStrings, CharMatcher trimmer, int limit) {
        this.strategy = strategy;
        this.omitEmptyStrings = omitEmptyStrings;
        this.trimmer = trimmer;
        this.limit = limit;
      }
    
      /**
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Fri Feb 09 15:49:48 GMT 2024
    - 23.7K bytes
    - Viewed (0)
  4. guava/src/com/google/common/base/Splitter.java

      private final int limit;
    
      private Splitter(Strategy strategy) {
        this(strategy, false, CharMatcher.none(), Integer.MAX_VALUE);
      }
    
      private Splitter(Strategy strategy, boolean omitEmptyStrings, CharMatcher trimmer, int limit) {
        this.strategy = strategy;
        this.omitEmptyStrings = omitEmptyStrings;
        this.trimmer = trimmer;
        this.limit = limit;
      }
    
      /**
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Thu Feb 15 16:12:13 GMT 2024
    - 24.4K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/math/LongMath.java

        long limit = Long.MAX_VALUE + ((a ^ b) >>> (Long.SIZE - 1));
        if (leadingZeros < Long.SIZE | (a < 0 & b == Long.MIN_VALUE)) {
          // overflow
          return limit;
        }
        long result = a * b;
        if (a == 0 || result / a == b) {
          return result;
        }
        return limit;
      }
    
      /**
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Feb 07 17:50:39 GMT 2024
    - 44.6K bytes
    - Viewed (0)
  6. 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)
  7. android/guava-tests/test/com/google/common/base/Utf8Test.java

       * @param expectedCount the expected number of roundtrippable permutations
       * @param start the starting bytes encoded as a long as big-endian
       * @param lim the limit of bytes to process encoded as a long as big-endian, or -1 to mean the max
       *     limit for numBytes
       */
      @GwtIncompatible // java.nio.charset.Charset
      private static void testBytes(int numBytes, long expectedCount, long start, long lim) {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Fri Feb 09 15:49:48 GMT 2024
    - 12.7K bytes
    - Viewed (0)
  8. guava-tests/test/com/google/common/base/SplitterTest.java

        String simple = "abcd";
        Iterable<String> letters = Splitter.fixedLength(1).limit(100).split(simple);
        assertThat(letters).containsExactly("a", "b", "c", "d").inOrder();
      }
    
      public void testLimitOne() {
        String simple = "abcd";
        Iterable<String> letters = Splitter.fixedLength(1).limit(1).split(simple);
        assertThat(letters).containsExactly("abcd").inOrder();
      }
    
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Fri Feb 09 15:49:48 GMT 2024
    - 29.8K bytes
    - Viewed (0)
  9. android/guava-tests/test/com/google/common/base/SplitterTest.java

        String simple = "abcd";
        Iterable<String> letters = Splitter.fixedLength(1).limit(100).split(simple);
        assertThat(letters).containsExactly("a", "b", "c", "d").inOrder();
      }
    
      public void testLimitOne() {
        String simple = "abcd";
        Iterable<String> letters = Splitter.fixedLength(1).limit(1).split(simple);
        assertThat(letters).containsExactly("abcd").inOrder();
      }
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Fri Feb 09 15:49:48 GMT 2024
    - 29.5K bytes
    - Viewed (0)
  10. android/guava/src/com/google/common/io/ByteStreams.java

       *
       * @param in the input stream to be wrapped
       * @param limit the maximum number of bytes to be read
       * @return a length-limited {@link InputStream}
       * @since 14.0 (since 1.0 as com.google.common.io.LimitInputStream)
       */
      public static InputStream limit(InputStream in, long limit) {
        return new LimitedInputStream(in, limit);
      }
    
      private static final class LimitedInputStream extends FilterInputStream {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Jan 17 18:59:58 GMT 2024
    - 29.7K bytes
    - Viewed (0)
Back to top