Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 48 for checkNonNegative (0.14 sec)

  1. guava-tests/test/com/google/common/math/MathPreconditionsTest.java

        MathPreconditions.checkNonNegative("float", 0f);
      }
    
      public void testCheckNonNegative_maxFloat() {
        MathPreconditions.checkNonNegative("float", Float.MAX_VALUE);
      }
    
      public void testCheckNonNegative_minFloat() {
        MathPreconditions.checkNonNegative("float", Float.MIN_VALUE);
      }
    
      public void testCheckNonNegative_positiveFloat() {
        MathPreconditions.checkNonNegative("float", 1f);
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 15:00:32 UTC 2024
    - 8K bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/collect/AbstractMapBasedMultiset.java

        checkNonnegative(count, "count");
        int oldCount = (count == 0) ? backingMap.remove(element) : backingMap.put(element, count);
        size += (count - oldCount);
        return oldCount;
      }
    
      @Override
      public final boolean setCount(@ParametricNullness E element, int oldCount, int newCount) {
        checkNonnegative(oldCount, "oldCount");
        checkNonnegative(newCount, "newCount");
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Mar 06 16:06:58 UTC 2023
    - 8.2K bytes
    - Viewed (0)
  3. 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)
  4. 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)
  5. guava/src/com/google/common/collect/CollectPreconditions.java

        }
      }
    
      @CanIgnoreReturnValue
      static int checkNonnegative(int value, String name) {
        if (value < 0) {
          throw new IllegalArgumentException(name + " cannot be negative but was: " + value);
        }
        return value;
      }
    
      @CanIgnoreReturnValue
      static long checkNonnegative(long value, String name) {
        if (value < 0) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Jun 30 10:33:07 UTC 2021
    - 2.1K bytes
    - Viewed (0)
  6. guava/src/com/google/common/graph/AbstractDirectedNetworkConnections.java

     */
    
    package com.google.common.graph;
    
    import static com.google.common.base.Preconditions.checkNotNull;
    import static com.google.common.base.Preconditions.checkState;
    import static com.google.common.graph.Graphs.checkNonNegative;
    import static com.google.common.graph.Graphs.checkPositive;
    import static java.util.Objects.requireNonNull;
    
    import com.google.common.collect.Iterables;
    import com.google.common.collect.Iterators;
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Apr 26 17:43:39 UTC 2021
    - 4.5K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/graph/AbstractDirectedNetworkConnections.java

     */
    
    package com.google.common.graph;
    
    import static com.google.common.base.Preconditions.checkNotNull;
    import static com.google.common.base.Preconditions.checkState;
    import static com.google.common.graph.Graphs.checkNonNegative;
    import static com.google.common.graph.Graphs.checkPositive;
    import static java.util.Objects.requireNonNull;
    
    import com.google.common.collect.Iterables;
    import com.google.common.collect.Iterators;
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Apr 26 17:43:39 UTC 2021
    - 4.5K bytes
    - Viewed (0)
  8. 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)
  9. android/guava/src/com/google/common/graph/NetworkBuilder.java

     * limitations under the License.
     */
    
    package com.google.common.graph;
    
    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
    - 7.4K bytes
    - Viewed (0)
  10. 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)
Back to top