Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 393 for whale (0.19 sec)

  1. android/guava-testlib/src/com/google/common/collect/testing/google/UnmodifiableCollectionTests.java

      /**
       * Verifies that an Iterator is unmodifiable.
       *
       * <p>This test only works with iterators that iterate over a finite set.
       */
      public static void assertIteratorIsUnmodifiable(Iterator<?> iterator) {
        while (iterator.hasNext()) {
          iterator.next();
          try {
            iterator.remove();
            fail("Remove on unmodifiable iterator succeeded");
          } catch (UnsupportedOperationException expected) {
          }
        }
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Feb 26 19:46:10 GMT 2024
    - 14.8K bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/collect/Comparators.java

          Iterable<? extends T> iterable, Comparator<T> comparator) {
        checkNotNull(comparator);
        Iterator<? extends T> it = iterable.iterator();
        if (it.hasNext()) {
          T prev = it.next();
          while (it.hasNext()) {
            T next = it.next();
            if (comparator.compare(prev, next) > 0) {
              return false;
            }
            prev = next;
          }
        }
        return true;
      }
    
      /**
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed May 01 18:44:57 GMT 2024
    - 10.2K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/util/concurrent/NullnessCasts.java

       *
       * <p>Why <i>not</i> just add {@code SuppressWarnings}? The problem is that this method is
       * typically useful for {@code return} statements. That leaves the code with two options: Either
       * add the suppression to the whole method (which turns off checking for a large section of code),
       * or extract a variable, and put the suppression on that. However, a local variable typically
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Feb 10 20:36:34 GMT 2022
    - 3.9K bytes
    - Viewed (0)
  4. guava-gwt/src-super/com/google/common/collect/super/com/google/common/collect/ImmutableCollection.java

            add(checkNotNull(element));
          }
          return this;
        }
    
        @CanIgnoreReturnValue
        public Builder<E> addAll(Iterator<? extends E> elements) {
          checkNotNull(elements); // for GWT
          while (elements.hasNext()) {
            add(checkNotNull(elements.next()));
          }
          return this;
        }
    
        public abstract ImmutableCollection<E> build();
      }
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Jan 23 18:43:40 GMT 2024
    - 5K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/util/concurrent/AtomicDoubleArrayTest.java

        a.set(0, 1.0);
        Thread t =
            newStartedThread(
                new CheckedRunnable() {
                  @Override
                  public void realRun() {
                    while (!a.compareAndSet(0, 2.0, 3.0)) {
                      Thread.yield();
                    }
                  }
                });
    
        assertTrue(a.compareAndSet(0, 1.0, 2.0));
        awaitTermination(t);
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Tue Feb 13 14:28:25 GMT 2024
    - 14.5K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/util/concurrent/CycleDetectingLockFactory.java

     * factory that created it. This allows detection of cycles across components while delegating
     * control over lock behavior to individual components.
     *
     * <p>Applications are encouraged to use a {@code CycleDetectingLockFactory} to create any locks for
     * which external/unmanaged code is executed while the lock is held. (See caveats under
     * <strong>Performance</strong>).
     *
     * <p><strong>Cycle Detection</strong>
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Fri Dec 15 19:31:54 GMT 2023
    - 35.9K bytes
    - Viewed (0)
  7. guava-tests/test/com/google/common/util/concurrent/RateLimiterTest.java

        for (int i = 0; i < 11; i++) {
          limiter.acquire(); // #7, showing off the warmup starting from totally cold
        }
    
        // make sure the areas (times) remain the same, while permits are different
        assertEvents(
            "R0.00, R1.38, R1.13, R0.88, R0.63, R0.50, R0.50, R0.50", // #1
            "U4.50", // #2
            "R0.00, R1.38, R1.13", // #3, after that the rate changes
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 21.6K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/math/LongMath.java

              // shift is either the number of powers of 2 left to multiply a by, or the biggest shift
              // possible while keeping a in an unsigned long.
              a = UnsignedLongs.remainder(a << shift, m);
              remainingPowersOf2 -= shift;
            } while (remainingPowersOf2 > 0);
            return a;
          }
    
          @Override
          long mulMod(long a, long b, long m) {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Feb 07 17:50:39 GMT 2024
    - 44.6K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/collect/SetMultimap.java

     * common to all multimaps.
     *
     * <p>The {@link #get}, {@link #removeAll}, and {@link #replaceValues} methods each return a {@link
     * Set} of values, while {@link #entries} returns a {@code Set} of map entries. Though the method
     * signature doesn't say so explicitly, the map returned by {@link #asMap} has {@code Set} values.
     *
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Jan 24 17:47:51 GMT 2022
    - 4.5K bytes
    - Viewed (0)
  10. android/guava/src/com/google/common/math/Quantiles.java

          }
          return;
        }
    
        // Let's play quickselect! We'll repeatedly partition the range [from, to] containing the
        // required element, as long as it has more than one element.
        while (to > from) {
          int partitionPoint = partition(array, from, to);
          if (partitionPoint >= required) {
            to = partitionPoint - 1;
          }
          if (partitionPoint <= required) {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Fri May 12 17:02:53 GMT 2023
    - 29.9K bytes
    - Viewed (0)
Back to top