Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 3 of 3 for paddedPartition (0.06 seconds)

  1. android/guava/src/com/google/common/collect/Iterables.java

       */
      public static <T extends @Nullable Object> Iterable<List<@Nullable T>> paddedPartition(
          Iterable<T> iterable, int size) {
        checkNotNull(iterable);
        checkArgument(size > 0);
        return new FluentIterable<List<@Nullable T>>() {
          @Override
          public Iterator<List<@Nullable T>> iterator() {
            return Iterators.paddedPartition(iterable.iterator(), size);
          }
        };
      }
    
      /**
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Tue Sep 16 18:35:28 GMT 2025
    - 43.8K bytes
    - Click Count (0)
  2. guava/src/com/google/common/collect/Iterables.java

       */
      public static <T extends @Nullable Object> Iterable<List<@Nullable T>> paddedPartition(
          Iterable<T> iterable, int size) {
        checkNotNull(iterable);
        checkArgument(size > 0);
        return new FluentIterable<List<@Nullable T>>() {
          @Override
          public Iterator<List<@Nullable T>> iterator() {
            return Iterators.paddedPartition(iterable.iterator(), size);
          }
        };
      }
    
      /**
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Sun Mar 08 16:16:42 GMT 2026
    - 43.6K bytes
    - Click Count (0)
  3. guava-tests/test/com/google/common/collect/IterablesTest.java

        Iterable<List<@Nullable Integer>> partitions = Iterables.paddedPartition(list, 2);
        assertEquals(3, Iterables.size(partitions));
        assertEquals(Arrays.<@Nullable Integer>asList(5, null), Iterables.getLast(partitions));
      }
    
      public void testPaddedPartitionRandomAccessInput() {
        Iterable<Integer> source = asList(1, 2, 3);
        Iterable<List<Integer>> partitions = Iterables.paddedPartition(source, 2);
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Fri Mar 13 13:01:07 GMT 2026
    - 47.5K bytes
    - Click Count (0)
Back to Top