Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 11 - 20 of 35 for isEnum (0.05 seconds)

  1. android/guava-testlib/src/com/google/common/testing/FreshValueGenerator.java

        Class<?> rawType = type.getRawType();
        List<Object> samples = sampleInstances.get(rawType);
        Object sample = pickInstance(samples, null);
        if (sample != null) {
          return sample;
        }
        if (rawType.isEnum()) {
          return pickInstance(rawType.getEnumConstants(), null);
        }
        if (type.isArray()) {
          TypeToken<?> componentType = requireNonNull(type.getComponentType());
    Created: Fri Dec 26 12:43:10 GMT 2025
    - Last Modified: Tue May 13 17:27:14 GMT 2025
    - 28.1K bytes
    - Click Count (0)
  2. cmd/api-headers_test.go

    	if len(id) != 16 {
    		t.Fail()
    	}
    
    	var e rune
    	for _, char := range id {
    		e = char
    
    		// Ensure that it is alphanumeric, in this case, between 0-9 and A-Z.
    		isAlnum := ('0' <= e && e <= '9') || ('A' <= e && e <= 'Z')
    		if !isAlnum {
    			t.Fail()
    		}
    	}
    Created: Sun Dec 28 19:28:13 GMT 2025
    - Last Modified: Sun Mar 30 00:56:02 GMT 2025
    - 1.2K bytes
    - Click Count (0)
  3. android/guava/src/com/google/common/math/DoubleUtils.java

        int exponent = absX.bitLength() - 1;
        // exponent == floor(log2(abs(x)))
        if (exponent < Long.SIZE - 1) {
          return x.longValue();
        } else if (exponent > MAX_EXPONENT) {
          return x.signum() * POSITIVE_INFINITY;
        }
    
        /*
         * We need the top SIGNIFICAND_BITS + 1 bits, including the "implicit" one bit. To make rounding
    Created: Fri Dec 26 12:43:10 GMT 2025
    - Last Modified: Sat Dec 21 03:10:51 GMT 2024
    - 5.1K bytes
    - Click Count (0)
  4. guava-tests/test/com/google/common/collect/ComparisonChainTest.java

                new Foo("b", 1, null));
        for (Foo a : instances) {
          for (Foo b : instances) {
            int comparedUsingComparisonChain = signum(comparatorUsingComparisonChain.compare(a, b));
            int comparedUsingComparatorMethods = signum(comparatorUsingComparatorMethods.compare(a, b));
            assertWithMessage("%s vs %s", a, b)
                .that(comparedUsingComparatorMethods)
    Created: Fri Dec 26 12:43:10 GMT 2025
    - Last Modified: Wed Feb 12 03:05:13 GMT 2025
    - 7.6K bytes
    - Click Count (0)
  5. android/guava-tests/test/com/google/common/primitives/UnsignedBytesTest.java

          int i = rnd.nextInt(left.length);
          left[i] ^= (byte) (1 + rnd.nextInt(255));
          assertThat(signum(comparator1.compare(left, right)))
              .isEqualTo(signum(UnsignedBytes.compare(left[i], right[i])));
          assertThat(signum(comparator2.compare(left, right)))
              .isEqualTo(signum(UnsignedBytes.compare(left[i], right[i])));
        }
      }
    
    Created: Fri Dec 26 12:43:10 GMT 2025
    - Last Modified: Thu Dec 11 20:45:32 GMT 2025
    - 13.5K bytes
    - Click Count (0)
  6. android/guava/src/com/google/common/math/MathPreconditions.java

          throw new IllegalArgumentException(role + " (" + x + ") must be > 0");
        }
        return x;
      }
    
      @CanIgnoreReturnValue
      static BigInteger checkPositive(String role, BigInteger x) {
        if (x.signum() <= 0) {
          throw new IllegalArgumentException(role + " (" + x + ") must be > 0");
        }
        return x;
      }
    
      @CanIgnoreReturnValue
      static int checkNonNegative(String role, int x) {
        if (x < 0) {
    Created: Fri Dec 26 12:43:10 GMT 2025
    - Last Modified: Sat Dec 21 03:10:51 GMT 2024
    - 3.2K bytes
    - Click Count (0)
  7. android/guava-tests/test/com/google/common/math/MathBenchmarking.java

       */
      static BigInteger randomPositiveBigInteger(int numBits) {
        BigInteger result;
        do {
          result = randomNonNegativeBigInteger(numBits);
        } while (result.signum() == 0);
        return result;
      }
    
      /**
       * Generates a number in [0, 2^numBits) with an exponential distribution. The floor of the log2 of
    Created: Fri Dec 26 12:43:10 GMT 2025
    - Last Modified: Sun Aug 10 19:54:19 GMT 2025
    - 4.2K bytes
    - Click Count (0)
  8. guava/src/com/google/common/math/DoubleUtils.java

        int exponent = absX.bitLength() - 1;
        // exponent == floor(log2(abs(x)))
        if (exponent < Long.SIZE - 1) {
          return x.longValue();
        } else if (exponent > MAX_EXPONENT) {
          return x.signum() * POSITIVE_INFINITY;
        }
    
        /*
         * We need the top SIGNIFICAND_BITS + 1 bits, including the "implicit" one bit. To make rounding
    Created: Fri Dec 26 12:43:10 GMT 2025
    - Last Modified: Sat Dec 21 03:10:51 GMT 2024
    - 5.1K bytes
    - Click Count (0)
  9. android/guava-tests/test/com/google/common/primitives/UnsignedIntsTest.java

        for (long a : UNSIGNED_INTS) {
          for (long b : UNSIGNED_INTS) {
            int cmpAsLongs = Long.compare(a, b);
            int cmpAsUInt = UnsignedInts.compare((int) a, (int) b);
            assertThat(Integer.signum(cmpAsUInt)).isEqualTo(Integer.signum(cmpAsLongs));
          }
        }
      }
    
      public void testMax_noArgs() {
        assertThrows(IllegalArgumentException.class, () -> max());
      }
    
      public void testMax() {
    Created: Fri Dec 26 12:43:10 GMT 2025
    - Last Modified: Thu Aug 07 16:05:33 GMT 2025
    - 12.5K bytes
    - Click Count (0)
  10. guava/src/com/google/common/math/BigDecimalMath.java

        @Override
        double roundToDoubleArbitrarily(BigDecimal bigDecimal) {
          return bigDecimal.doubleValue();
        }
    
        @Override
        int sign(BigDecimal bigDecimal) {
          return bigDecimal.signum();
        }
    
        @Override
        BigDecimal toX(double d, RoundingMode mode) {
          return new BigDecimal(d);
        }
    
        @Override
        BigDecimal minus(BigDecimal a, BigDecimal b) {
          return a.subtract(b);
    Created: Fri Dec 26 12:43:10 GMT 2025
    - Last Modified: Thu Jul 17 15:26:41 GMT 2025
    - 3K bytes
    - Click Count (0)
Back to Top