Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 10 for checkPositive (0.08 sec)

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

      }
    
      public void testCheckPositive_negativeInt() {
        assertThrows(IllegalArgumentException.class, () -> MathPreconditions.checkPositive("int", -1));
      }
    
      public void testCheckPositive_zeroLong() {
        assertThrows(IllegalArgumentException.class, () -> MathPreconditions.checkPositive("long", 0L));
      }
    
      public void testCheckPositive_maxLong() {
    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/graph/AbstractDirectedNetworkConnections.java

    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;
    import com.google.common.collect.Sets;
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Apr 26 17:43:39 UTC 2021
    - 4.5K bytes
    - Viewed (0)
  3. guava/src/com/google/common/graph/AbstractDirectedNetworkConnections.java

    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;
    import com.google.common.collect.Sets;
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Apr 26 17:43:39 UTC 2021
    - 4.5K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/graph/DirectedGraphConnections.java

    import static com.google.common.graph.GraphConstants.INNER_LOAD_FACTOR;
    import static com.google.common.graph.Graphs.checkNonNegative;
    import static com.google.common.graph.Graphs.checkPositive;
    
    import com.google.common.base.Function;
    import com.google.common.collect.AbstractIterator;
    import com.google.common.collect.ImmutableList;
    import com.google.common.collect.Iterators;
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Feb 20 17:00:05 UTC 2024
    - 18K bytes
    - Viewed (0)
  5. guava/src/com/google/common/collect/CollectPreconditions.java

      static long checkNonnegative(long value, String name) {
        if (value < 0) {
          throw new IllegalArgumentException(name + " cannot be negative but was: " + value);
        }
        return value;
      }
    
      static void checkPositive(int value, String name) {
        if (value <= 0) {
          throw new IllegalArgumentException(name + " must be positive but was: " + value);
        }
      }
    
      /**
    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/math/BigIntegerMath.java

    import static com.google.common.base.Preconditions.checkNotNull;
    import static com.google.common.math.MathPreconditions.checkNonNegative;
    import static com.google.common.math.MathPreconditions.checkPositive;
    import static com.google.common.math.MathPreconditions.checkRoundingUnnecessary;
    import static java.math.RoundingMode.CEILING;
    import static java.math.RoundingMode.FLOOR;
    import static java.math.RoundingMode.HALF_EVEN;
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 16 17:21:56 UTC 2024
    - 18.8K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/collect/ObjectCountHashMap.java

     * limitations under the License.
     */
    
    package com.google.common.collect;
    
    import static com.google.common.base.Preconditions.checkElementIndex;
    import static com.google.common.collect.CollectPreconditions.checkPositive;
    import static com.google.common.collect.Hashing.smearedHash;
    
    import com.google.common.annotations.GwtCompatible;
    import com.google.common.annotations.VisibleForTesting;
    import com.google.common.base.Objects;
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Jun 01 22:07:10 UTC 2021
    - 15K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/collect/ConcurrentHashMultiset.java

      @CanIgnoreReturnValue
      @Override
      public int add(E element, int occurrences) {
        checkNotNull(element);
        if (occurrences == 0) {
          return count(element);
        }
        CollectPreconditions.checkPositive(occurrences, "occurrences");
    
        while (true) {
          AtomicInteger existingCounter = safeGet(countMap, element);
          if (existingCounter == null) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 21.1K bytes
    - Viewed (0)
  9. guava/src/com/google/common/math/LongMath.java

    import static com.google.common.math.MathPreconditions.checkNoOverflow;
    import static com.google.common.math.MathPreconditions.checkNonNegative;
    import static com.google.common.math.MathPreconditions.checkPositive;
    import static com.google.common.math.MathPreconditions.checkRoundingUnnecessary;
    import static java.lang.Math.abs;
    import static java.lang.Math.min;
    import static java.math.RoundingMode.HALF_EVEN;
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 09 16:39:37 UTC 2024
    - 45.2K bytes
    - Viewed (0)
  10. android/guava/src/com/google/common/math/LongMath.java

    import static com.google.common.math.MathPreconditions.checkNoOverflow;
    import static com.google.common.math.MathPreconditions.checkNonNegative;
    import static com.google.common.math.MathPreconditions.checkPositive;
    import static com.google.common.math.MathPreconditions.checkRoundingUnnecessary;
    import static java.lang.Math.abs;
    import static java.lang.Math.min;
    import static java.math.RoundingMode.HALF_EVEN;
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 09 16:39:37 UTC 2024
    - 45.2K bytes
    - Viewed (0)
Back to top