Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 34 for ValueOf (0.68 sec)

  1. guava-tests/test/com/google/common/base/EquivalenceTest.java

       * `new Integer` (as we do) instead of `Integer.valueOf`. However, under J2KT, `new Integer`
       * gets translated back to `Integer.valueOf` because that is the only thing J2KT can support. And
       * anyway, it's nice to avoid `Integer.valueOf` because the Android toolchain optimizes multiple
       * `Integer.valueOf` calls into one! So we stick with the deprecated `Integer` constructor.
       */
    
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Tue Feb 20 17:00:05 GMT 2024
    - 6.5K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/base/AsciiTest.java

          String str = String.valueOf(c);
          assertEquals(str, c, Ascii.toLowerCase(c));
          assertEquals(str, c, Ascii.toUpperCase(c));
          assertFalse(str, Ascii.isLowerCase(c));
          assertFalse(str, Ascii.isUpperCase(c));
        }
      }
    
      public void testCharsLower() {
        for (char c : LOWER.toCharArray()) {
          String str = String.valueOf(c);
          assertTrue(str, c == Ascii.toLowerCase(c));
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Fri Feb 09 15:49:48 GMT 2024
    - 5.5K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/primitives/UnsignedIntegerTest.java

        for (int a : TEST_INTS) {
          long value = a & 0xffffffffL;
          equalsTester.addEqualityGroup(
              UnsignedInteger.fromIntBits(a),
              UnsignedInteger.valueOf(value),
              UnsignedInteger.valueOf(Long.toString(value)),
              UnsignedInteger.valueOf(Long.toString(value, 16), 16));
        }
        equalsTester.testEquals();
      }
    
      public void testIntValue() {
        for (int a : TEST_INTS) {
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Thu Jun 01 09:32:35 GMT 2023
    - 9.6K bytes
    - Viewed (0)
  4. guava-tests/test/com/google/common/reflect/MutableTypeToInstanceMapTest.java

        assertThrows(
            UnsupportedOperationException.class,
            () -> map.put(TypeToken.of(Integer.class), Integer.valueOf(5)));
      }
    
      public void testPutAllThrows() {
        assertThrows(
            UnsupportedOperationException.class,
            () -> map.putAll(ImmutableMap.of(TypeToken.of(Integer.class), Integer.valueOf(5))));
      }
    
      public void testEntrySetMutationThrows() {
        map.putInstance(String.class, "test");
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Thu Feb 22 17:15:24 GMT 2024
    - 7.9K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/base/ConverterTest.java

          new Converter<String, Long>() {
            @Override
            protected Long doForward(String object) {
              return Long.valueOf(object);
            }
    
            @Override
            protected String doBackward(Long object) {
              return String.valueOf(object);
            }
    
            @Override
            public String toString() {
              return "string2long";
            }
          };
    
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Fri Oct 06 17:02:33 GMT 2023
    - 7.8K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/primitives/UnsignedInteger.java

       *
       * @since 14.0
       */
      public static UnsignedInteger fromIntBits(int bits) {
        return new UnsignedInteger(bits);
      }
    
      /**
       * Returns an {@code UnsignedInteger} that is equal to {@code value}, if possible. The inverse
       * operation of {@link #longValue()}.
       */
      public static UnsignedInteger valueOf(long value) {
        checkArgument(
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Feb 23 18:45:50 GMT 2023
    - 8.3K bytes
    - Viewed (0)
  7. guava-tests/test/com/google/common/base/ObjectsTest.java

        assertFalse(Objects.equal("1", 1));
      }
    
      public void testHashCode() throws Exception {
        int h1 = Objects.hashCode(1, "two", 3.0);
        int h2 = Objects.hashCode(Integer.valueOf(1), new String("two"), Double.valueOf(3.0));
        // repeatable
        assertEquals(h1, h2);
    
        // These don't strictly need to be true, but they're nice properties.
        assertTrue(Objects.hashCode(1, 2, null) != Objects.hashCode(1, 2));
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Feb 21 18:32:41 GMT 2024
    - 2.3K bytes
    - Viewed (0)
  8. guava/src/com/google/common/base/Defaults.java

            return (T) Character.valueOf('\0');
          } else if (type == byte.class) {
            return (T) Byte.valueOf((byte) 0);
          } else if (type == short.class) {
            return (T) Short.valueOf((short) 0);
          } else if (type == int.class) {
            return (T) Integer.valueOf(0);
          } else if (type == long.class) {
            return (T) Long.valueOf(0L);
          } else if (type == float.class) {
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Thu Feb 23 15:09:35 GMT 2023
    - 2.2K bytes
    - Viewed (0)
  9. guava-tests/test/com/google/common/escape/UnicodeEscaperTest.java

      public void testBadStrings() {
        UnicodeEscaper e = SIMPLE_ESCAPER;
        String[] BAD_STRINGS = {
          String.valueOf(Character.MIN_LOW_SURROGATE),
          Character.MIN_LOW_SURROGATE + "xyz",
          "abc" + Character.MIN_LOW_SURROGATE,
          "abc" + Character.MIN_LOW_SURROGATE + "xyz",
          String.valueOf(Character.MAX_LOW_SURROGATE),
          Character.MAX_LOW_SURROGATE + "xyz",
          "abc" + Character.MAX_LOW_SURROGATE,
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Apr 19 19:24:36 GMT 2023
    - 6.2K bytes
    - Viewed (0)
  10. 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)
Back to top