- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 34 for checkNonnegative (0.09 sec)
-
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) -
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) -
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) -
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) -
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) -
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) -
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) -
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) -
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) -
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)