Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 794 for if (0.16 sec)

  1. 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.
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Thu Feb 22 21:19:52 GMT 2024
    - 20.9K bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/collect/TreeRangeSet.java

          if (rangeBelowLB.upperBound.compareTo(lbToAdd) >= 0) {
            // { < }, and we will need to coalesce
            if (rangeBelowLB.upperBound.compareTo(ubToAdd) >= 0) {
              // { < > }
              ubToAdd = rangeBelowLB.upperBound;
              /*
               * TODO(cpovirk): can we just "return;" here? Or, can we remove this if() entirely? If
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Jun 26 21:02:13 GMT 2023
    - 32.5K bytes
    - Viewed (0)
  3. guava/src/com/google/common/base/Preconditions.java

       * @throws IndexOutOfBoundsException if either index is negative or is greater than {@code size},
       *     or if {@code end} is less than {@code start}
       * @throws IllegalArgumentException if {@code size} is negative
       */
      public static void checkPositionIndexes(int start, int end, int size) {
        // Carefully optimized for execution by hotspot (explanatory comment above)
        if (start < 0 || end < start || end > size) {
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Wed Feb 14 15:46:55 GMT 2024
    - 52.9K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/collect/MoreCollectors.java

       *
       * @throws IllegalArgumentException if the stream consists of two or more elements.
       * @throws NullPointerException if any element in the stream is {@code null}.
       * @return {@code Optional.of(onlyElement)} if the stream has exactly one element (must not be
       *     {@code null}) and returns {@code Optional.empty()} if it has none.
       */
      @SuppressWarnings("unchecked")
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Fri Dec 08 18:58:42 GMT 2023
    - 5.6K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/reflect/TypeToken.java

        checkNotNull(supertype);
        if (supertype instanceof WildcardType) {
          // if 'supertype' is <? super Foo>, 'this' can be:
          // Foo, SubFoo, <? extends Foo>.
          // if 'supertype' is <? extends Foo>, nothing is a subtype.
          return any(((WildcardType) supertype).getLowerBounds()).isSupertypeOf(runtimeType);
        }
        // if 'this' is wildcard, it's a suptype of to 'supertype' if any of its "extends"
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Jun 26 21:02:13 GMT 2023
    - 53.6K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/collect/TreeRangeMap.java

            entriesByLowerBound.lowerEntry(rangeToRemove.lowerBound);
        if (mapEntryBelowToTruncate != null) {
          // we know ( [
          RangeMapEntry<K, V> rangeMapEntry = mapEntryBelowToTruncate.getValue();
          if (rangeMapEntry.getUpperBound().compareTo(rangeToRemove.lowerBound) > 0) {
            // we know ( [ )
            if (rangeMapEntry.getUpperBound().compareTo(rangeToRemove.upperBound) > 0) {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Feb 22 21:19:52 GMT 2024
    - 21.9K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/net/HostAndPort.java

      public String getHost() {
        return host;
      }
    
      /** Return true if this instance has a defined port. */
      public boolean hasPort() {
        return port >= 0;
      }
    
      /**
       * Get the current port number, failing if no port is defined.
       *
       * @return a validated port number, in the range [0..65535]
       * @throws IllegalStateException if no port is defined. You can use {@link #withDefaultPort(int)}
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Aug 22 20:55:57 GMT 2023
    - 11.3K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/primitives/Chars.java

       * @return the same value cast to {@code char} if it is in the range of the {@code char} type,
       *     {@link Character#MAX_VALUE} if it is too large, or {@link Character#MIN_VALUE} if it is too
       *     small
       */
      public static char saturatedCast(long value) {
        if (value > Character.MAX_VALUE) {
          return Character.MAX_VALUE;
        }
        if (value < Character.MIN_VALUE) {
          return Character.MIN_VALUE;
        }
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Feb 15 16:12:13 GMT 2024
    - 23.5K bytes
    - Viewed (0)
  9. android/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;
        }
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Feb 15 16:12:13 GMT 2024
    - 29.7K bytes
    - Viewed (0)
  10. android/guava/src/com/google/common/util/concurrent/Futures.java

       * whenAllComplete}.
       *
       * <p>If you are looking for a method to determine whether a given {@code Future} is done, use the
       * instance method {@link Future#isDone()}.
       *
       * @throws ExecutionException if the {@code Future} failed with an exception
       * @throws CancellationException if the {@code Future} was cancelled
       * @throws IllegalStateException if the {@code Future} is not done
       * @since 20.0
       */
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 59.6K bytes
    - Viewed (0)
Back to top