Search Options

Results per page
Sort
Preferred Languages
Advance

Results 141 - 150 of 1,449 for sublist (0.2 sec)

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

            list.add(random.nextInt(10 * i + j + 1));
          }
    
          for (int seed = 1; seed < seeds; seed++) {
            int k = random.nextInt(10 * seed);
            assertEquals(ordering.sortedCopy(list).subList(0, k), ordering.leastOf(list, k));
          }
        }
      }
    
      public void testLeastOfIterableLargeK() {
        List<Integer> list = Arrays.asList(4, 2, 3, 5, 1);
        assertEquals(
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Thu Mar 07 18:34:03 UTC 2024
    - 42.5K bytes
    - Viewed (0)
  2. platforms/software/dependency-management/src/integTest/groovy/org/gradle/integtests/resolve/verification/DependencyVerificationSignatureWriteIntegTest.groovy

            def count = 50
            def duplicatesCount = 10
            def keyrings = Stream.generate { newKeyRing() }.limit(count - duplicatesCount).collect(Collectors.toList())
            keyrings.addAll(keyrings.subList(0, duplicatesCount))
    
            createMetadataFile {
                keyServer(keyServerFixture.uri)
            }
    
            given:
            javaLibrary()
            def dependencies = new StringBuilder()
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Feb 02 07:31:22 UTC 2024
    - 29.5K bytes
    - Viewed (0)
  3. guava/src/com/google/common/collect/Iterables.java

          public Iterator<T> iterator() {
            if (iterable instanceof List) {
              final List<T> list = (List<T>) iterable;
              int toSkip = Math.min(list.size(), numberToSkip);
              return list.subList(toSkip, list.size()).iterator();
            }
            final Iterator<T> iterator = iterable.iterator();
    
            Iterators.advance(iterator, numberToSkip);
    
            /*
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Wed Apr 24 19:38:27 UTC 2024
    - 42.5K bytes
    - Viewed (0)
  4. guava/src/com/google/common/collect/ImmutableCollection.java

     *       However, the precise conditions for skipping the copy operation are undefined.
     *   <li><b>Warning:</b> a view collection such as {@link ImmutableMap#keySet} or {@link
     *       ImmutableList#subList} may retain a reference to the entire data set, preventing it from
     *       being garbage collected. If some of the data is no longer reachable through other means,
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Mon Apr 01 16:15:01 UTC 2024
    - 18.7K bytes
    - Viewed (0)
  5. guava/src/com/google/common/collect/Ordering.java

          return Collections.emptyList();
        } else if (k >= Integer.MAX_VALUE / 2) {
          // k is really large; just do a straightforward sorted-copy-and-sublist
          ArrayList<E> list = Lists.newArrayList(iterator);
          Collections.sort(list, this);
          if (list.size() > k) {
            list.subList(k, list.size()).clear();
          }
          list.trimToSize();
          return Collections.unmodifiableList(list);
        } else {
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Tue May 28 18:11:09 UTC 2024
    - 39.4K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/collect/Iterables.java

                return true;
              }
            }
            to++;
          }
        }
    
        // Clear the tail of any remaining items
        list.subList(to, list.size()).clear();
        return from != to;
      }
    
      private static <T extends @Nullable Object> void slowRemoveIfForRemainingElements(
          List<T> list, Predicate<? super T> predicate, int to, int from) {
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Wed Apr 24 19:38:27 UTC 2024
    - 42.8K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/collect/Collections2.java

           */
          requireNonNull(nextPermutation);
    
          int l = findNextL(j);
          Collections.swap(nextPermutation, j, l);
          int n = nextPermutation.size();
          Collections.reverse(nextPermutation.subList(j + 1, n));
        }
    
        int findNextJ() {
          /*
           * requireNonNull is safe because we don't clear nextPermutation until we're done calling this
           * method.
           */
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Mon Apr 01 16:15:01 UTC 2024
    - 22.8K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/collect/ImmutableCollection.java

     *       However, the precise conditions for skipping the copy operation are undefined.
     *   <li><b>Warning:</b> a view collection such as {@link ImmutableMap#keySet} or {@link
     *       ImmutableList#subList} may retain a reference to the entire data set, preventing it from
     *       being garbage collected. If some of the data is no longer reachable through other means,
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Mon Apr 01 16:15:01 UTC 2024
    - 21.5K bytes
    - Viewed (0)
  9. android/guava-tests/test/com/google/common/primitives/BooleansTest.java

        VALUES = Booleans.concat(VALUES, VALUES);
    
        for (int delta : new int[] {+1, 0, -1}) {
          for (int i = 0; i < VALUES.length; i++) {
            List<Boolean> list = Booleans.asList(VALUES).subList(0, i);
            Collection<Boolean> misleadingSize = Helpers.misleadingSizeCollection(delta);
            misleadingSize.addAll(list);
            boolean[] arr = Booleans.toArray(misleadingSize);
            assertThat(arr).hasLength(i);
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Mon Mar 04 15:43:29 UTC 2024
    - 23.9K bytes
    - Viewed (0)
  10. android/guava/src/com/google/common/collect/Ordering.java

          return Collections.emptyList();
        } else if (k >= Integer.MAX_VALUE / 2) {
          // k is really large; just do a straightforward sorted-copy-and-sublist
          ArrayList<E> list = Lists.newArrayList(iterator);
          Collections.sort(list, this);
          if (list.size() > k) {
            list.subList(k, list.size()).clear();
          }
          list.trimToSize();
          return Collections.unmodifiableList(list);
        } else {
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Tue May 28 18:11:09 UTC 2024
    - 39.4K bytes
    - Viewed (0)
Back to top