Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 385 for max (0.17 sec)

  1. android/guava/src/com/google/common/base/Utf8.java

     * the License.
     */
    
    package com.google.common.base;
    
    import static com.google.common.base.Preconditions.checkPositionIndexes;
    import static java.lang.Character.MAX_SURROGATE;
    import static java.lang.Character.MIN_SURROGATE;
    
    import com.google.common.annotations.GwtCompatible;
    
    /**
     * Low-level, high-performance utility methods related to the {@linkplain Charsets#UTF_8 UTF-8}
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Apr 10 14:11:51 GMT 2023
    - 7K bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/math/DoubleUtils.java

         * directly. If the exponent is MAX_DOUBLE_EXPONENT, we round up (correctly) to
         * 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);
      }
    
    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)
  3. android/guava/src/com/google/common/escape/CharEscaperBuilder.java

      private int max = -1;
    
      /** Construct a new sparse array builder. */
      public CharEscaperBuilder() {
        this.map = new HashMap<>();
      }
    
      /** Add a new mapping from an index to an object to the escaping. */
      @CanIgnoreReturnValue
      public CharEscaperBuilder addEscape(char c, String r) {
        map.put(c, checkNotNull(r));
        if (c > max) {
          max = c;
        }
        return this;
      }
    
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Jan 18 20:55:09 GMT 2022
    - 4K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/primitives/ImmutableDoubleArray.java

       * <p>The array {@code rest} must not be longer than {@code Integer.MAX_VALUE - 1}.
       */
      // Use (first, rest) so that `of(someDoubleArray)` won't compile (they should use copyOf), which
      // is okay since we have to copy the just-created array anyway.
      public static ImmutableDoubleArray of(double first, double... rest) {
        checkArgument(
            rest.length <= Integer.MAX_VALUE - 1, "the total number of elements must fit in an int");
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Fri May 12 16:34:24 GMT 2023
    - 19.6K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/primitives/DoublesTest.java

      @GwtIncompatible
      public void testMax_noArgs() {
        try {
          Doubles.max();
          fail();
        } catch (IllegalArgumentException expected) {
        }
      }
    
      public void testMax() {
        assertThat(Doubles.max(LEAST)).isEqualTo(LEAST);
        assertThat(Doubles.max(GREATEST)).isEqualTo(GREATEST);
        assertThat(
                Doubles.max(
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Thu Feb 29 15:43:06 GMT 2024
    - 31.5K bytes
    - Viewed (0)
  6. android/guava-tests/test/com/google/common/primitives/DoublesTest.java

      @GwtIncompatible
      public void testMax_noArgs() {
        try {
          Doubles.max();
          fail();
        } catch (IllegalArgumentException expected) {
        }
      }
    
      public void testMax() {
        assertThat(Doubles.max(LEAST)).isEqualTo(LEAST);
        assertThat(Doubles.max(GREATEST)).isEqualTo(GREATEST);
        assertThat(
                Doubles.max(
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Feb 29 15:43:06 GMT 2024
    - 31.5K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/collect/TopKSelector.java

        this.comparator = checkNotNull(comparator, "comparator");
        this.k = k;
        checkArgument(k >= 0, "k (%s) must be >= 0", k);
        checkArgument(k <= Integer.MAX_VALUE / 2, "k (%s) must be <= Integer.MAX_VALUE / 2", k);
        this.buffer = (T[]) new Object[IntMath.checkedMultiply(k, 2)];
        this.bufferSize = 0;
        this.threshold = null;
      }
    
      /**
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 11.2K bytes
    - Viewed (0)
  8. guava/src/com/google/common/collect/Collections2.java

              // We move to the next non-repeated element.
              permutations = IntMath.saturatedMultiply(permutations, IntMath.binomial(n, r));
              r = 0;
              if (permutations == Integer.MAX_VALUE) {
                return Integer.MAX_VALUE;
              }
            }
            n++;
            r++;
          }
          return IntMath.saturatedMultiply(permutations, IntMath.binomial(n, r));
        }
    
        @Override
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 23.1K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/escape/ArrayBasedEscaperMap.java

        checkNotNull(map); // GWT specific check (do not optimize)
        if (map.isEmpty()) {
          return EMPTY_REPLACEMENT_ARRAY;
        }
        char max = Collections.max(map.keySet());
        char[][] replacements = new char[max + 1][];
        for (Character c : map.keySet()) {
          replacements[c] = map.get(c).toCharArray();
        }
        return replacements;
      }
    
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Jan 18 20:55:09 GMT 2022
    - 3.2K bytes
    - Viewed (0)
  10. android/guava-tests/test/com/google/common/collect/ComparatorsTest.java

        assertThat(Comparators.min(2, 1)).isEqualTo(1);
        assertThat(Comparators.max(1, 2)).isEqualTo(2);
        assertThat(Comparators.max(2, 1)).isEqualTo(2);
      }
    
      public void testMinMaxNatural_equalInstances() {
        Foo a = new Foo(1);
        Foo b = new Foo(1);
        assertThat(Comparators.min(a, b)).isSameInstanceAs(a);
        assertThat(Comparators.max(a, b)).isSameInstanceAs(a);
      }
    
      public void testMinMaxComparator() {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Apr 11 08:42:51 GMT 2024
    - 5.6K bytes
    - Viewed (0)
Back to top