Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 48 for checkNonnegative (0.13 sec)

  1. guava/src/com/google/common/math/LongMath.java

         * gcd(0, Long.MIN_VALUE)? BigInteger.gcd would return positive 2^63, but positive 2^63 isn't an
         * int.
         */
        checkNonNegative("a", a);
        checkNonNegative("b", b);
        if (a == 0) {
          // 0 % b == 0, so b divides a, but the converse doesn't hold.
          // BigInteger.gcd is consistent with this decision.
          return b;
        } else if (b == 0) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 09 16:39:37 UTC 2024
    - 45.2K bytes
    - Viewed (0)
  2. guava/src/com/google/common/graph/StandardValueGraph.java

    package com.google.common.graph;
    
    import static com.google.common.base.Preconditions.checkNotNull;
    import static com.google.common.graph.GraphConstants.DEFAULT_NODE_COUNT;
    import static com.google.common.graph.Graphs.checkNonNegative;
    
    import java.util.Iterator;
    import java.util.Map;
    import java.util.Set;
    import java.util.TreeMap;
    import javax.annotation.CheckForNull;
    
    /**
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Jan 22 17:29:38 UTC 2024
    - 6.1K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/math/LongMath.java

         * gcd(0, Long.MIN_VALUE)? BigInteger.gcd would return positive 2^63, but positive 2^63 isn't an
         * int.
         */
        checkNonNegative("a", a);
        checkNonNegative("b", b);
        if (a == 0) {
          // 0 % b == 0, so b divides a, but the converse doesn't hold.
          // BigInteger.gcd is consistent with this decision.
          return b;
        } else if (b == 0) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 09 16:39:37 UTC 2024
    - 45.2K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/graph/ValueGraphBuilder.java

     */
    
    package com.google.common.graph;
    
    import static com.google.common.base.Preconditions.checkArgument;
    import static com.google.common.base.Preconditions.checkNotNull;
    import static com.google.common.graph.Graphs.checkNonNegative;
    
    import com.google.common.annotations.Beta;
    import com.google.common.base.Optional;
    import com.google.errorprone.annotations.CanIgnoreReturnValue;
    
    /**
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Jun 03 01:21:31 UTC 2022
    - 8K bytes
    - Viewed (0)
  5. guava/src/com/google/common/collect/TreeMultiset.java

        return result[0];
      }
    
      @CanIgnoreReturnValue
      @Override
      public boolean setCount(@ParametricNullness E element, int oldCount, int newCount) {
        checkNonnegative(newCount, "newCount");
        checkNonnegative(oldCount, "oldCount");
        checkArgument(range.contains(element));
    
        AvlNode<E> root = rootReference.get();
        if (root == null) {
          if (oldCount == 0) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 20:24:49 UTC 2024
    - 34.5K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/collect/TreeMultiset.java

        return result[0];
      }
    
      @CanIgnoreReturnValue
      @Override
      public boolean setCount(@ParametricNullness E element, int oldCount, int newCount) {
        checkNonnegative(newCount, "newCount");
        checkNonnegative(oldCount, "oldCount");
        checkArgument(range.contains(element));
    
        AvlNode<E> root = rootReference.get();
        if (root == null) {
          if (oldCount == 0) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 20:24:49 UTC 2024
    - 34.1K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/collect/Multisets.java

      static <E extends @Nullable Object> boolean setCountImpl(
          Multiset<E> self, @ParametricNullness E element, int oldCount, int newCount) {
        checkNonnegative(oldCount, "oldCount");
        checkNonnegative(newCount, "newCount");
    
        if (self.count(element) == oldCount) {
          self.setCount(element, newCount);
          return true;
        } else {
          return false;
        }
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:05:46 UTC 2024
    - 41.7K bytes
    - Viewed (0)
  8. guava/src/com/google/common/collect/Multisets.java

      static <E extends @Nullable Object> boolean setCountImpl(
          Multiset<E> self, @ParametricNullness E element, int oldCount, int newCount) {
        checkNonnegative(oldCount, "oldCount");
        checkNonnegative(newCount, "newCount");
    
        if (self.count(element) == oldCount) {
          self.setCount(element, newCount);
          return true;
        } else {
          return false;
        }
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:05:46 UTC 2024
    - 41.5K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/collect/ConcurrentHashMultiset.java

       */
      @CanIgnoreReturnValue
      @Override
      public boolean setCount(E element, int expectedOldCount, int newCount) {
        checkNotNull(element);
        checkNonnegative(expectedOldCount, "oldCount");
        checkNonnegative(newCount, "newCount");
    
        AtomicInteger existingCounter = safeGet(countMap, element);
        if (existingCounter == null) {
          if (expectedOldCount != 0) {
            return false;
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 21.1K bytes
    - Viewed (0)
  10. guava/src/com/google/common/collect/AbstractMapBasedMultiset.java

    import static com.google.common.base.Preconditions.checkNotNull;
    import static com.google.common.base.Preconditions.checkState;
    import static com.google.common.collect.CollectPreconditions.checkNonnegative;
    import static com.google.common.collect.CollectPreconditions.checkRemove;
    import static com.google.common.collect.Maps.safeGet;
    import static java.util.Objects.requireNonNull;
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 10.4K bytes
    - Viewed (0)
Back to top