Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 380 for if (0.02 sec)

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

        }
        while (true) {
          int oldValue = existingCounter.get();
          if (oldValue < occurrences) {
            return false;
          }
          int newValue = oldValue - occurrences;
          if (existingCounter.compareAndSet(oldValue, newValue)) {
            if (newValue == 0) {
              // Just CASed to 0; remove the entry to clean up the map. If the removal fails,
              // another thread has already replaced it with a new counter, which is fine.
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Thu Feb 22 21:19:52 UTC 2024
    - 20.9K bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/util/concurrent/AtomicLongMap.java

       *
       * <p>If {@code expectedOldValue} is zero, this method will succeed if {@code (key, zero)} is
       * currently in the map, or if {@code key} is not in the map at all.
       */
      boolean replace(K key, long expectedOldValue, long newValue) {
        if (expectedOldValue == 0L) {
          return putIfAbsent(key, newValue) == 0L;
        } else {
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Mon Apr 01 16:15:01 UTC 2024
    - 14.1K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/collect/TreeMultiset.java

              result[0] = 0;
              if (expectedCount == 0 && newCount > 0) {
                return addRightChild(e, newCount);
              }
              return this;
            }
    
            right = initRight.setCount(comparator, e, expectedCount, newCount, result);
    
            if (result[0] == expectedCount) {
              if (newCount == 0 && result[0] != 0) {
                this.distinctElements--;
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Mon Apr 01 16:15:01 UTC 2024
    - 34.2K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/collect/ImmutableRangeSet.java

        checkNotNull(rangeSet);
        if (rangeSet.isEmpty()) {
          return of();
        } else if (rangeSet.encloses(Range.<C>all())) {
          return all();
        }
    
        if (rangeSet instanceof ImmutableRangeSet) {
          ImmutableRangeSet<C> immutableRangeSet = (ImmutableRangeSet<C>) rangeSet;
          if (!immutableRangeSet.isPartialView()) {
            return immutableRangeSet;
          }
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Sun Jun 02 13:36:19 UTC 2024
    - 27.1K bytes
    - Viewed (0)
  5. guava/src/com/google/common/collect/MinMaxPriorityQueue.java

        private boolean verifyIndex(int i) {
          if ((getLeftChildIndex(i) < size) && (compareElements(i, getLeftChildIndex(i)) > 0)) {
            return false;
          }
          if ((getRightChildIndex(i) < size) && (compareElements(i, getRightChildIndex(i)) > 0)) {
            return false;
          }
          if ((i > 0) && (compareElements(i, getParentIndex(i)) > 0)) {
            return false;
          }
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Thu Feb 22 21:19:52 UTC 2024
    - 34K bytes
    - Viewed (0)
  6. guava/src/com/google/common/collect/Range.java

       *
       * @throws ClassCastException if the values are not mutually comparable
       * @throws NoSuchElementException if {@code values} is empty
       * @throws NullPointerException if any of {@code values} is null
       * @since 14.0
       */
      public static <C extends Comparable<?>> Range<C> encloseAll(Iterable<C> values) {
        checkNotNull(values);
        if (values instanceof SortedSet) {
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Thu Feb 22 21:19:52 UTC 2024
    - 27.8K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/collect/RegularImmutableMap.java

      // exception for a later buildOrThrow(). If builder is null that means that a duplicate
      // key will lead to an immediate exception. If it is not null then a duplicate key will instead be
      // stored in the builder, which may use it to throw an exception later.
      static <K, V> RegularImmutableMap<K, V> create(
          int n, @Nullable Object[] alternatingKeysAndValues, @Nullable Builder<K, V> builder) {
        if (n == 0) {
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Mon Apr 15 22:32:14 UTC 2024
    - 22.7K bytes
    - Viewed (0)
  8. guava/src/com/google/common/math/IntMath.java

       * RoundingMode}.
       *
       * @throws ArithmeticException if {@code q == 0}, or if {@code mode == UNNECESSARY} and {@code a}
       *     is not an integer multiple of {@code b}
       */
      @SuppressWarnings("fallthrough")
      public static int divide(int p, int q, RoundingMode mode) {
        checkNotNull(mode);
        if (q == 0) {
          throw new ArithmeticException("/ by zero"); // for GWT
        }
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Wed Feb 07 17:50:39 UTC 2024
    - 23.5K bytes
    - Viewed (0)
  9. guava/src/com/google/common/primitives/Ints.java

       * @return the same value cast to {@code int} if it is in the range of the {@code int} type,
       *     {@link Integer#MAX_VALUE} if it is too large, or {@link Integer#MIN_VALUE} if it is too
       *     small
       */
      public static int saturatedCast(long value) {
        if (value > Integer.MAX_VALUE) {
          return Integer.MAX_VALUE;
        }
        if (value < Integer.MIN_VALUE) {
          return Integer.MIN_VALUE;
        }
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Thu Feb 15 16:12:13 UTC 2024
    - 29.9K bytes
    - Viewed (0)
  10. android/guava/src/com/google/common/collect/RangeSet.java

       * this.contains(value)} whenever {@code other.contains(value)}. Returns {@code true} if {@code
       * other} is empty.
       *
       * <p>This is equivalent to checking if this range set {@link #encloses} each of the ranges in
       * {@code other}.
       */
      boolean enclosesAll(RangeSet<C> other);
    
      /**
       * Returns {@code true} if for each range in {@code other} there exists a member range in this
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Thu Feb 22 21:19:52 UTC 2024
    - 9.8K bytes
    - Viewed (0)
Back to top