Search Options

Results per page
Sort
Preferred Languages
Advance

Results 61 - 70 of 239 for negate (0.3 sec)

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

        }
      }
    
      public void testCeilingPowerOfTwoNegative() {
        for (int x : NEGATIVE_INTEGER_CANDIDATES) {
          try {
            IntMath.ceilingPowerOfTwo(x);
            fail("Expected IllegalArgumentException");
          } catch (IllegalArgumentException expected) {
          }
        }
      }
    
      public void testFloorPowerOfTwoNegative() {
        for (int x : NEGATIVE_INTEGER_CANDIDATES) {
          try {
            IntMath.floorPowerOfTwo(x);
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Feb 07 17:50:39 GMT 2024
    - 24.5K bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/collect/AbstractIndexedListIterator.java

       * #previous()} can retrieve the preceding {@code position} elements.
       *
       * @throws IndexOutOfBoundsException if {@code position} is negative or is greater than {@code
       *     size}
       * @throws IllegalArgumentException if {@code size} is negative
       */
      protected AbstractIndexedListIterator(int size, int position) {
        checkPositionIndex(position, size);
        this.size = size;
        this.position = position;
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Fri Jul 09 17:31:04 GMT 2021
    - 3.2K bytes
    - Viewed (0)
  3. guava/src/com/google/common/collect/CollectPreconditions.java

        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) {
          throw new IllegalArgumentException(name + " cannot be negative but was: " + value);
        }
        return value;
      }
    
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Wed Jun 30 10:33:07 GMT 2021
    - 2.1K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/collect/CollectPreconditions.java

        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) {
          throw new IllegalArgumentException(name + " cannot be negative but was: " + value);
        }
        return value;
      }
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Jun 30 10:33:07 GMT 2021
    - 2.1K bytes
    - Viewed (0)
  5. android/guava-tests/benchmark/com/google/common/collect/ConcurrentHashMultisetBenchmark.java

        Random random = new Random();
        int nKeys = keys.size();
        long blah = 0;
        for (int i = 0; i < reps; i++) {
          Integer key = keys.get(random.nextInt(nKeys));
          // This range is [-5, 4] - slight negative bias so we often hit zero, which brings the
          // auto-removal of zeroes into play.
          int delta = random.nextInt(10) - 5;
          blah += delta;
          if (delta >= 0) {
            multiset.add(key, delta);
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Apr 06 12:56:11 GMT 2023
    - 16.6K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/io/CharSequenceReader.java

          cbuf[off + i] = seq.charAt(pos++);
        }
        return charsToRead;
      }
    
      @Override
      public synchronized long skip(long n) throws IOException {
        checkArgument(n >= 0, "n (%s) may not be negative", n);
        checkOpen();
        int charsToSkip = (int) Math.min(remaining(), n); // safe because remaining is an int
        pos += charsToSkip;
        return charsToSkip;
      }
    
      @Override
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Feb 28 20:13:02 GMT 2023
    - 4.5K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/collect/ConcurrentHashMultiset.java

       * @param occurrences the number of occurrences to add
       * @return the previous count of the element before the operation; possibly zero
       * @throws IllegalArgumentException if {@code occurrences} is negative, or if the resulting amount
       *     would exceed {@link Integer#MAX_VALUE}
       */
      @CanIgnoreReturnValue
      @Override
      public int add(E element, int occurrences) {
        checkNotNull(element);
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Feb 22 21:19:52 GMT 2024
    - 20.9K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/math/DoubleUtils.java

         * Double.POSITIVE_INFINITY.
         */
        bits |= x.signum() & SIGN_MASK;
        return longBitsToDouble(bits);
      }
    
      /** Returns its argument if it is non-negative, zero if it is negative. */
      static double ensureNonNegative(double value) {
        checkArgument(!isNaN(value));
        return Math.max(value, 0.0);
      }
    
      @VisibleForTesting static final long ONE_BITS = 0x3ff0000000000000L;
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Apr 28 15:37:52 GMT 2021
    - 5.1K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/collect/AbstractMapBasedMultiset.java

      @Override
      public final int add(@ParametricNullness E element, int occurrences) {
        if (occurrences == 0) {
          return count(element);
        }
        checkArgument(occurrences > 0, "occurrences cannot be negative: %s", occurrences);
        int entryIndex = backingMap.indexOf(element);
        if (entryIndex == -1) {
          backingMap.put(element, occurrences);
          size += occurrences;
          return 0;
        }
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Mar 06 16:06:58 GMT 2023
    - 8.2K bytes
    - Viewed (0)
  10. guava-tests/test/com/google/common/math/StatsTesting.java

          for (double first : ImmutableList.of(1.1, POSITIVE_INFINITY, NEGATIVE_INFINITY, NaN)) {
            values[0] = first;
            values[1] = -44.44;
            for (double third : ImmutableList.of(33.33, POSITIVE_INFINITY, NEGATIVE_INFINITY, NaN)) {
              values[2] = third;
              values[3] = 555.555;
              for (double fifth : ImmutableList.of(-2.2, POSITIVE_INFINITY, NEGATIVE_INFINITY, NaN)) {
                values[4] = fifth;
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Thu Nov 09 22:49:56 GMT 2023
    - 23.8K bytes
    - Viewed (0)
Back to top