Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 35 for checkNonnegative (0.11 sec)

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

     * limitations under the License.
     */
    
    package com.google.common.collect;
    
    import static com.google.common.base.Preconditions.checkNotNull;
    import static com.google.common.collect.CollectPreconditions.checkNonnegative;
    
    import com.google.common.annotations.GwtCompatible;
    import com.google.common.base.Supplier;
    import java.io.Serializable;
    import java.util.ArrayList;
    import java.util.Collection;
    import java.util.Comparator;
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Feb 22 21:19:52 UTC 2024
    - 17.5K bytes
    - Viewed (0)
  2. guava/src/com/google/common/collect/DiscreteDomain.java

     * limitations under the License.
     */
    
    package com.google.common.collect;
    
    import static com.google.common.base.Preconditions.checkArgument;
    import static com.google.common.collect.CollectPreconditions.checkNonnegative;
    
    import com.google.common.annotations.GwtCompatible;
    import com.google.common.primitives.Ints;
    import com.google.errorprone.annotations.CanIgnoreReturnValue;
    import java.io.Serializable;
    import java.math.BigInteger;
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Feb 22 21:19:52 UTC 2024
    - 10.3K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/graph/DirectedGraphConnections.java

          int successorCount) {
        this.adjacentNodeValues = checkNotNull(adjacentNodeValues);
        this.orderedNodeConnections = orderedNodeConnections;
        this.predecessorCount = checkNonNegative(predecessorCount);
        this.successorCount = checkNonNegative(successorCount);
        checkState(
            predecessorCount <= adjacentNodeValues.size()
                && successorCount <= adjacentNodeValues.size());
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Feb 20 17:00:05 UTC 2024
    - 18K bytes
    - Viewed (0)
  4. guava/src/com/google/common/math/BigIntegerMath.java

       *
       * @throws IllegalArgumentException if {@code n < 0}, {@code k < 0}, or {@code k > n}
       */
      public static BigInteger binomial(int n, int k) {
        checkNonNegative("n", n);
        checkNonNegative("k", k);
        checkArgument(k <= n, "k (%s) > n (%s)", k, n);
        if (k > (n >> 1)) {
          k = n - k;
        }
        if (k < LongMath.biggestBinomials.length && n <= LongMath.biggestBinomials[k]) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 16 17:21:56 UTC 2024
    - 18.8K bytes
    - Viewed (0)
  5. 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)
  6. 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)
  7. 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)
  8. 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)
  9. 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)
  10. 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)
Back to top