Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 47 for skip (0.16 sec)

  1. android/guava-tests/test/com/google/common/collect/FluentIterableTest.java

        assertEquals("[c, d, e]", FluentIterable.from(set).skip(2).toString());
      }
    
      public void testSkip_simpleList() {
        Collection<String> list = Lists.newArrayList("a", "b", "c", "d", "e");
        assertEquals(
            Lists.newArrayList("c", "d", "e"), Lists.newArrayList(FluentIterable.from(list).skip(2)));
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue Jun 06 17:32:08 GMT 2023
    - 30.6K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/collect/IterablesTest.java

        assertEquals(newArrayList("c", "d", "e"), newArrayList(skip(set, 2)));
        assertEquals("[c, d, e]", skip(set, 2).toString());
      }
    
      public void testSkip_simpleList() {
        Collection<String> list = newArrayList("a", "b", "c", "d", "e");
        assertEquals(newArrayList("c", "d", "e"), newArrayList(skip(list, 2)));
        assertEquals("[c, d, e]", skip(list, 2).toString());
      }
    
      public void testSkip_pastEnd() {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Mar 07 18:34:03 GMT 2024
    - 46K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/collect/Iterables.java

       *
       * <p><b>{@code Stream} equivalent:</b> {@link Stream#skip}
       *
       * @since 3.0
       */
      public static <T extends @Nullable Object> Iterable<T> skip(
          final Iterable<T> iterable, final int numberToSkip) {
        checkNotNull(iterable);
        checkArgument(numberToSkip >= 0, "number to skip cannot be negative");
    
        return new FluentIterable<T>() {
          @Override
    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)
  4. guava-tests/test/com/google/common/io/ByteStreamsTest.java

      }
    
      /** Stream that will skip a maximum number of bytes at a time. */
      private static class SlowSkipper extends FilterInputStream {
        private final long max;
    
        SlowSkipper(InputStream in, long max) {
          super(in);
          this.max = max;
        }
    
        @Override
        public long skip(long n) throws IOException {
          return super.skip(Math.min(max, n));
        }
      }
    
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 21.9K bytes
    - Viewed (1)
  5. guava-tests/test/com/google/common/collect/IterablesTest.java

        assertEquals(newArrayList("c", "d", "e"), newArrayList(skip(set, 2)));
        assertEquals("[c, d, e]", skip(set, 2).toString());
      }
    
      public void testSkip_simpleList() {
        Collection<String> list = newArrayList("a", "b", "c", "d", "e");
        assertEquals(newArrayList("c", "d", "e"), newArrayList(skip(list, 2)));
        assertEquals("[c, d, e]", skip(list, 2).toString());
      }
    
      public void testSkip_pastEnd() {
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Thu Mar 07 18:34:03 GMT 2024
    - 47.5K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/io/ByteStreams.java

              // is smaller.
              buf = new byte[skip];
            }
            if ((skipped = in.read(buf, 0, skip)) == -1) {
              // Reached EOF
              break;
            }
          }
    
          totalSkipped += skipped;
        }
    
        return totalSkipped;
      }
    
      /**
       * Attempts to skip up to {@code n} bytes from the given input stream, but not more than {@code
    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)
  7. android/guava-tests/test/com/google/common/io/ByteStreamsTest.java

      }
    
      /** Stream that will skip a maximum number of bytes at a time. */
      private static class SlowSkipper extends FilterInputStream {
        private final long max;
    
        SlowSkipper(InputStream in, long max) {
          super(in);
          this.max = max;
        }
    
        @Override
        public long skip(long n) throws IOException {
          return super.skip(Math.min(max, n));
        }
      }
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 21.9K bytes
    - Viewed (0)
  8. guava-tests/test/com/google/common/io/ByteSourceTest.java

        assertEquals(bytes.length, source.size());
        assertTrue(source.wasStreamOpened() && source.wasStreamClosed());
    
        // test that we can get the size even if skip() isn't supported
        assertEquals(bytes.length, new TestByteSource(bytes, SKIP_THROWS).size());
    
        // test that we can get the size even if available() always returns zero
        assertEquals(bytes.length, new TestByteSource(bytes, AVAILABLE_ALWAYS_ZERO).size());
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 16.9K bytes
    - Viewed (0)
  9. android/guava-tests/test/com/google/common/io/ByteSourceTest.java

        assertEquals(bytes.length, source.size());
        assertTrue(source.wasStreamOpened() && source.wasStreamClosed());
    
        // test that we can get the size even if skip() isn't supported
        assertEquals(bytes.length, new TestByteSource(bytes, SKIP_THROWS).size());
    
        // test that we can get the size even if available() always returns zero
        assertEquals(bytes.length, new TestByteSource(bytes, AVAILABLE_ALWAYS_ZERO).size());
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 16.9K bytes
    - Viewed (0)
  10. android/guava/src/com/google/common/io/CharSource.java

       *
       * <p>The default implementation calls {@link #lengthIfKnown} and returns the value if present. If
       * absent, it will fall back to a heavyweight operation that will open a stream, {@link
       * Reader#skip(long) skip} to the end of the stream, and return the total number of chars that
       * were skipped.
       *
       * <p>Note that for sources that implement {@link #lengthIfKnown} to provide a more efficient
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed May 17 14:35:11 GMT 2023
    - 22.4K bytes
    - Viewed (0)
Back to top