Search Options

Results per page
Sort
Preferred Languages
Advance

Results 91 - 100 of 480 for sublist (0.15 sec)

  1. android/guava/src/com/google/common/util/concurrent/CycleDetectingLockFactory.java

        for (int i = 1; i < numKeys; i++) {
          nodes.get(i).checkAcquiredLocks(Policies.THROW, nodes.subList(0, i));
        }
        // Pre-populate all disallowedPriorLocks with nodes of larger ordinal.
        for (int i = 0; i < numKeys - 1; i++) {
          nodes.get(i).checkAcquiredLocks(Policies.DISABLED, nodes.subList(i + 1, numKeys));
        }
        return Collections.unmodifiableMap(map);
      }
    
      /**
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Fri Dec 15 19:31:54 UTC 2023
    - 35.9K bytes
    - Viewed (0)
  2. 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)
  3. 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)
  4. 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)
  5. 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)
  6. 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)
  7. 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)
  8. 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)
  9. 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)
  10. guava/src/com/google/common/primitives/ImmutableDoubleArray.java

        }
    
        @Override
        public int lastIndexOf(@CheckForNull Object target) {
          return target instanceof Double ? parent.lastIndexOf((Double) target) : -1;
        }
    
        @Override
        public List<Double> subList(int fromIndex, int toIndex) {
          return parent.subArray(fromIndex, toIndex).asList();
        }
    
        // The default List spliterator is not efficiently splittable
        @Override
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Fri May 12 16:34:24 UTC 2023
    - 21.7K bytes
    - Viewed (0)
Back to top