Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 50 of 160 for ValueOf (0.18 sec)

  1. android/guava-tests/benchmark/com/google/common/math/BigIntegerMathBenchmark.java

      /** Previous version of BigIntegerMath.factorial, kept for timing purposes. */
      private static BigInteger oldSlowFactorial(int n) {
        if (n <= 20) {
          return BigInteger.valueOf(LongMath.factorial(n));
        } else {
          int k = 20;
          return BigInteger.valueOf(LongMath.factorial(k)).multiply(oldSlowFactorial(k, n));
        }
      }
    
      /** Returns the product of {@code n1} exclusive through {@code n2} inclusive. */
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 3.3K bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/base/MoreObjects.java

          return addUnconditionalHolder(name, String.valueOf(value));
        }
    
        /**
         * Adds a name/value pair to the formatted output in {@code name=value} format.
         *
         * @since 18.0 (since 11.0 as {@code Objects.ToStringHelper.add()}).
         */
        @CanIgnoreReturnValue
        public ToStringHelper add(String name, char value) {
          return addUnconditionalHolder(name, String.valueOf(value));
        }
    
        /**
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Fri Oct 13 14:11:58 GMT 2023
    - 15.4K bytes
    - Viewed (0)
  3. guava-testlib/src/com/google/common/testing/FreshValueGenerator.java

      }
    
      @SuppressWarnings("removal") // b/321209431 -- maybe just use valueOf here?
      @Generates
      Integer generateInteger() {
        return new Integer(generateInt());
      }
    
      @Generates
      long generateLong() {
        return generateInt();
      }
    
      @SuppressWarnings("removal") // b/321209431 -- maybe just use valueOf here?
      @Generates
      Long generateLongObject() {
        return new Long(generateLong());
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Apr 17 16:33:44 GMT 2024
    - 28.6K bytes
    - Viewed (0)
  4. android/guava-tests/test/com/google/common/collect/ImmutableRangeSetTest.java

        @Override
        public SampleElements<BigInteger> samples() {
          return new SampleElements<>(
              BigInteger.valueOf(1),
              BigInteger.valueOf(4),
              BigInteger.valueOf(3),
              BigInteger.valueOf(2),
              BigInteger.valueOf(5));
        }
    
        @Override
        public BigInteger[] createArray(int length) {
          return new BigInteger[length];
        }
    
        @Override
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue Feb 20 17:00:05 GMT 2024
    - 21.6K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/base/Enums.java

        } catch (NoSuchFieldException impossible) {
          throw new AssertionError(impossible);
        }
      }
    
      /**
       * Returns an optional enum constant for the given type, using {@link Enum#valueOf}. If the
       * constant does not exist, {@link Optional#absent} is returned. A common use case is for parsing
       * user input or falling back to a default enum constant. For example, {@code
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Fri May 26 11:56:44 GMT 2023
    - 5K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/math/BigIntegerMath.java

            denominatorAccum *= q;
            numeratorBits += bits;
          }
        }
        return accum
            .multiply(BigInteger.valueOf(numeratorAccum))
            .divide(BigInteger.valueOf(denominatorAccum));
      }
    
      // Returns true if BigInteger.valueOf(x.longValue()).equals(x).
      @GwtIncompatible // TODO
      static boolean fitsInLong(BigInteger x) {
        return x.bitLength() <= Long.SIZE - 1;
      }
    
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Feb 07 17:50:39 GMT 2024
    - 18.9K bytes
    - Viewed (0)
  7. android/guava-tests/test/com/google/common/primitives/FloatsTest.java

      /**
       * A reference implementation for {@code tryParse} that just catches the exception from {@link
       * Float#valueOf}.
       */
      private static @Nullable Float referenceTryParse(String input) {
        if (input.trim().length() < input.length()) {
          return null;
        }
        try {
          return Float.valueOf(input);
        } catch (NumberFormatException e) {
          return null;
        }
      }
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Feb 29 15:43:06 GMT 2024
    - 29.5K bytes
    - Viewed (0)
  8. guava-tests/test/com/google/common/primitives/LongsTest.java

            .that(Longs.tryParse(BigInteger.valueOf(MAX_VALUE).add(BigInteger.ONE).toString()))
            .isNull();
        assertWithMessage("Max long * 10")
            .that(Longs.tryParse(BigInteger.valueOf(MAX_VALUE).multiply(BigInteger.TEN).toString()))
            .isNull();
        assertWithMessage("Min long - 1")
            .that(Longs.tryParse(BigInteger.valueOf(MIN_VALUE).subtract(BigInteger.ONE).toString()))
            .isNull();
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Tue Feb 20 17:00:05 GMT 2024
    - 30K bytes
    - Viewed (0)
  9. android/guava-tests/test/com/google/common/primitives/LongsTest.java

            .that(Longs.tryParse(BigInteger.valueOf(MAX_VALUE).add(BigInteger.ONE).toString()))
            .isNull();
        assertWithMessage("Max long * 10")
            .that(Longs.tryParse(BigInteger.valueOf(MAX_VALUE).multiply(BigInteger.TEN).toString()))
            .isNull();
        assertWithMessage("Min long - 1")
            .that(Longs.tryParse(BigInteger.valueOf(MIN_VALUE).subtract(BigInteger.ONE).toString()))
            .isNull();
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue Feb 20 17:00:05 GMT 2024
    - 30K bytes
    - Viewed (0)
  10. guava-tests/test/com/google/common/collect/IteratorsTest.java

                new Function<String, Integer>() {
                  @Override
                  public Integer apply(String from) {
                    return Integer.valueOf(from);
                  }
                });
    
        assertEquals(Integer.valueOf(1), iterator.next());
        assertEquals(Integer.valueOf(2), iterator.next());
        iterator.remove();
        assertEquals(asList("1", "3"), list);
      }
    
      public void testPoorlyBehavedTransform() {
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Thu Mar 07 18:34:03 GMT 2024
    - 55.7K bytes
    - Viewed (0)
Back to top