Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 60 for calling (0.16 sec)

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

        Iterator<Integer> consumingIterator = Iterables.consumingIterable(queue).iterator();
        /*
         * Make sure that we can get an element off without calling
         * UnIterableQueue.iterator().
         */
        assertEquals(5, consumingIterator.next().intValue());
      }
    
      private static class UnIterableQueue<T> extends ForwardingQueue<T> {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Mar 07 18:34:03 GMT 2024
    - 46K bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/collect/ImmutableSetMultimap.java

      }
    
      /**
       * Returns the empty multimap.
       *
       * <p><b>Performance note:</b> the instance returned is a singleton.
       */
      // Casting is safe because the multimap will never hold any elements.
      @SuppressWarnings("unchecked")
      public static <K, V> ImmutableSetMultimap<K, V> of() {
        return (ImmutableSetMultimap<K, V>) EmptyImmutableSetMultimap.INSTANCE;
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed May 01 18:44:57 GMT 2024
    - 23.6K bytes
    - Viewed (0)
  3. guava/src/com/google/common/collect/ImmutableList.java

       * Collections#emptyList}, and is preferable mainly for consistency and maintainability of your
       * code.
       *
       * <p><b>Performance note:</b> the instance returned is a singleton.
       */
      // Casting to any type is safe because the list will never hold any elements.
      @SuppressWarnings("unchecked")
      public static <E> ImmutableList<E> of() {
        return (ImmutableList<E>) EMPTY;
      }
    
      /**
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 30K bytes
    - Viewed (1)
  4. android/guava/src/com/google/common/collect/ImmutableEnumSet.java

            return new ImmutableEnumSet<>(set);
        }
      }
    
      /*
       * Notes on EnumSet and <E extends Enum<E>>:
       *
       * This class isn't an arbitrary ForwardingImmutableSet because we need to
       * know that calling {@code clone()} during deserialization will return an
       * object that no one else has a reference to, allowing us to guarantee
       * immutability. Hence, we support only {@link EnumSet}.
       */
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 4.2K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/collect/ImmutableSortedSet.java

      @CheckForNull
      public E floor(E e) {
        return Iterators.<@Nullable E>getNext(headSet(e, true).descendingIterator(), null);
      }
    
      /** @since 12.0 */
      @Override
      @CheckForNull
      public E ceiling(E e) {
        return Iterables.<@Nullable E>getFirst(tailSet(e, true), null);
      }
    
      /** @since 12.0 */
      @GwtIncompatible // NavigableSet
      @Override
      @CheckForNull
      public E higher(E e) {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed May 01 18:44:57 GMT 2024
    - 36.9K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/collect/Ordering.java

       * benchmarking
       * on Open JDK 7, {@link #immutableSortedCopy} generally performs better (in both time and space)
       * than this method, and this method in turn generally performs better than copying the list and
       * calling {@link Collections#sort(List)}.
       */
      // TODO(kevinb): rerun benchmarks including new options
      @SuppressWarnings("nullness") // TODO: b/316358623 - Remove after checker fix.
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Apr 24 19:38:27 GMT 2024
    - 39.4K bytes
    - Viewed (0)
  7. android/guava-tests/test/com/google/common/collect/TopKSelectorTest.java

        for (int i = 1; i < n; i++) {
          top.offer(0);
        }
        assertThat(top.topK()).containsExactlyElementsIn(Collections.nCopies(k, 0));
        assertThat(compareCalls[0]).isAtMost(10L * n * IntMath.log2(k, RoundingMode.CEILING));
      }
    
      public void testExceedMaxIteration() {
        /*
         * Bug #5692 occurred when TopKSelector called Arrays.sort incorrectly.
         */
        TopKSelector<Integer> top = TopKSelector.least(7);
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Mar 07 18:34:03 GMT 2024
    - 3.9K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/graph/Graphs.java

        }
        return endpoints;
      }
    
      // NOTE: this should work as long as the delegate graph's implementation of edges() (like that of
      // AbstractGraph) derives its behavior from calling successors().
      private static class TransposedGraph<N> extends ForwardingGraph<N> {
        private final Graph<N> graph;
    
        TransposedGraph(Graph<N> graph) {
          this.graph = graph;
        }
    
        @Override
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 21.2K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/io/BaseEncoding.java

    import static com.google.common.base.Preconditions.checkState;
    import static com.google.common.math.IntMath.divide;
    import static com.google.common.math.IntMath.log2;
    import static java.math.RoundingMode.CEILING;
    import static java.math.RoundingMode.FLOOR;
    import static java.math.RoundingMode.UNNECESSARY;
    
    import com.google.common.annotations.GwtCompatible;
    import com.google.common.annotations.GwtIncompatible;
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Fri Mar 15 16:33:32 GMT 2024
    - 41.7K bytes
    - Viewed (0)
  10. android/guava/src/com/google/common/collect/TopKSelector.java

        // The leftmost position at which the greatest of the k lower elements
        // -- the new value of threshold -- might be found.
    
        int iterations = 0;
        int maxIterations = IntMath.log2(right - left, RoundingMode.CEILING) * 3;
        while (left < right) {
          int pivotIndex = (left + right + 1) >>> 1;
    
          int pivotNewIndex = partition(left, right, pivotIndex);
    
          if (pivotNewIndex > k) {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 11.2K bytes
    - Viewed (0)
Back to top