Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 17 for converter (1.96 sec)

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

      public void testStringConverter_convert() {
        Converter<String, TestEnum> converter = Enums.stringConverter(TestEnum.class);
        assertEquals(TestEnum.CHEETO, converter.convert("CHEETO"));
        assertEquals(TestEnum.HONDA, converter.convert("HONDA"));
        assertEquals(TestEnum.POODLE, converter.convert("POODLE"));
        assertNull(converter.convert(null));
        assertNull(converter.reverse().convert(null));
      }
    
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Wed May 29 16:29:37 UTC 2024
    - 8.7K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/collect/MapsTest.java

        assertEquals((Integer) 2, converter.convert("two"));
        try {
          converter.convert("three");
          fail();
        } catch (IllegalArgumentException expected) {
        }
    
        biMap.put("three", 3);
    
        assertEquals((Integer) 1, converter.convert("one"));
        assertEquals((Integer) 2, converter.convert("two"));
        assertEquals((Integer) 3, converter.convert("three"));
      }
    
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Fri May 17 15:27:58 UTC 2024
    - 67.1K bytes
    - Viewed (0)
  3. android/guava-testlib/src/com/google/common/testing/NullPointerTester.java

          T defaultType = (T) getFirstTypeParameter(type.getType());
          return defaultType;
        }
        if (type.getRawType() == Converter.class) {
          TypeToken<?> convertFromType = type.resolveType(Converter.class.getTypeParameters()[0]);
          TypeToken<?> convertToType = type.resolveType(Converter.class.getTypeParameters()[1]);
          @SuppressWarnings("unchecked") // returns default for both F and T
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Tue Jun 11 16:13:05 UTC 2024
    - 22.6K bytes
    - Viewed (0)
  4. guava-testlib/src/com/google/common/testing/NullPointerTester.java

          T defaultType = (T) getFirstTypeParameter(type.getType());
          return defaultType;
        }
        if (type.getRawType() == Converter.class) {
          TypeToken<?> convertFromType = type.resolveType(Converter.class.getTypeParameters()[0]);
          TypeToken<?> convertToType = type.resolveType(Converter.class.getTypeParameters()[1]);
          @SuppressWarnings("unchecked") // returns default for both F and T
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Tue Jun 11 16:13:05 UTC 2024
    - 23.2K bytes
    - Viewed (0)
  5. guava-testlib/test/com/google/common/testing/NullPointerTesterTest.java

        @SuppressWarnings("unused") // called by NullPointerTester
        public void checkArray(Converter<String, Integer> c, String s) {
          calledWith(c, s);
        }
    
        void check() {
          runTester();
          @SuppressWarnings("unchecked") // We are checking it anyway
          Converter<String, Integer> defaultConverter =
              (Converter<String, Integer>) getDefaultParameterValue(0);
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Tue Jun 11 16:13:05 UTC 2024
    - 47.7K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/collect/Maps.java

       * com.google.common.base.Functions#forMap(Map, Object)}.
       *
       * @since 16.0
       */
      public static <A, B> Converter<A, B> asConverter(final BiMap<A, B> bimap) {
        return new BiMapConverter<>(bimap);
      }
    
      private static final class BiMapConverter<A, B> extends Converter<A, B> implements Serializable {
        private final BiMap<A, B> bimap;
    
        BiMapConverter(BiMap<A, B> bimap) {
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Sun Jun 02 13:36:19 UTC 2024
    - 159.5K bytes
    - Viewed (0)
  7. guava/src/com/google/common/collect/Maps.java

       * com.google.common.base.Functions#forMap(Map, Object)}.
       *
       * @since 16.0
       */
      public static <A, B> Converter<A, B> asConverter(final BiMap<A, B> bimap) {
        return new BiMapConverter<>(bimap);
      }
    
      private static final class BiMapConverter<A, B> extends Converter<A, B> implements Serializable {
        private final BiMap<A, B> bimap;
    
        BiMapConverter(BiMap<A, B> bimap) {
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Wed Apr 24 19:38:27 UTC 2024
    - 165.9K bytes
    - Viewed (0)
  8. guava/src/com/google/common/primitives/UnsignedBytes.java

        return toString(x, 10);
      }
    
      /**
       * Returns a string representation of {@code x} for the given radix, where {@code x} is treated as
       * unsigned.
       *
       * @param x the value to convert to a string.
       * @param radix the radix to use while working with {@code x}
       * @throws IllegalArgumentException if {@code radix} is not between {@link Character#MIN_RADIX}
       *     and {@link Character#MAX_RADIX}.
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Fri Jun 07 22:25:23 UTC 2024
    - 18.3K bytes
    - Viewed (0)
  9. guava/src/com/google/common/collect/Iterables.java

       */
      static @Nullable Object[] toArray(Iterable<?> iterable) {
        return castOrCopyToCollection(iterable).toArray();
      }
    
      /**
       * Converts an iterable into a collection. If the iterable is already a collection, it is
       * returned. Otherwise, an {@link java.util.ArrayList} is created with the contents of the
       * iterable in the same iteration order.
       */
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Wed Apr 24 19:38:27 UTC 2024
    - 42.5K bytes
    - Viewed (0)
  10. guava/src/com/google/common/base/Preconditions.java

       * Ensures the truth of an expression involving one or more parameters to the calling method.
       *
       * @param expression a boolean expression
       * @param errorMessage the exception message to use if the check fails; will be converted to a
       *     string using {@link String#valueOf(Object)}
       * @throws IllegalArgumentException if {@code expression} is false
       */
      public static void checkArgument(boolean expression, @CheckForNull Object errorMessage) {
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Thu Apr 11 11:52:14 UTC 2024
    - 52.9K bytes
    - Viewed (0)
Back to top