Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 41 - 50 of 232 for converties (0.44 seconds)

  1. guava-tests/test/com/google/common/primitives/IntsTest.java

        Converter<String, Integer> converter = Ints.stringConverter();
        assertThat(converter.convert("1")).isEqualTo(1);
        assertThat(converter.convert("0")).isEqualTo(0);
        assertThat(converter.convert("-1")).isEqualTo(-1);
        assertThat(converter.convert("0xff")).isEqualTo(255);
        assertThat(converter.convert("0xFF")).isEqualTo(255);
        assertThat(converter.convert("-0xFF")).isEqualTo(-255);
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Sun Mar 08 01:43:32 GMT 2026
    - 29.4K bytes
    - Click Count (0)
  2. android/guava-tests/test/com/google/common/primitives/DoublesTest.java

      }
    
      public void testStringConverter_convert() {
        Converter<String, Double> converter = Doubles.stringConverter();
        assertThat(converter.convert("1.0")).isEqualTo(1.0);
        assertThat(converter.convert("0.0")).isEqualTo(0.0);
        assertThat(converter.convert("-1.0")).isEqualTo(-1.0);
        assertThat(converter.convert("1")).isEqualTo(1.0);
        assertThat(converter.convert("0")).isEqualTo(0.0);
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Sun Mar 08 01:43:32 GMT 2026
    - 30.9K bytes
    - Click Count (0)
  3. compat/maven-embedder/src/main/java/org/eclipse/sisu/plexus/PlexusXmlBeanConverter.java

        // ----------------------------------------------------------------------
    
        /**
         * Parses a sequence of XML elements and converts them to the given target type.
         *
         * @param parser The XML parser
         * @param toType The target type
         * @return Converted instance of the target type
         */
        private Object parse(final MXParser parser, final TypeLiteral<?> toType) throws Exception {
    Created: Sun Apr 05 03:35:12 GMT 2026
    - Last Modified: Wed Jul 23 17:27:08 GMT 2025
    - 15.3K bytes
    - Click Count (0)
  4. docs/fr/docs/tutorial/query-params.md

    Comme ils font partie de l'URL, ce sont « naturellement » des chaînes de caractères.
    
    Mais lorsque vous les déclarez avec des types Python (dans l'exemple ci-dessus, en tant que `int`), ils sont convertis vers ce type et validés par rapport à celui-ci.
    
    Tous les mêmes processus qui s'appliquaient aux paramètres de chemin s'appliquent aussi aux paramètres de requête :
    
    * Prise en charge de l'éditeur (évidemment)
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 19 18:37:13 GMT 2026
    - 5.3K bytes
    - Click Count (0)
  5. src/main/java/org/codelibs/core/convert/LongConversionUtil.java

         */
        protected LongConversionUtil() {
        }
    
        /**
         * Converts the given object to a {@link Long}.
         *
         * @param o
         *            the object to convert
         * @return the converted {@link Long}
         */
        public static Long toLong(final Object o) {
            return toLong(o, null);
        }
    
        /**
         * Converts the given object to a {@link Long}.
         *
         * @param o
    Created: Fri Apr 03 20:58:12 GMT 2026
    - Last Modified: Thu Jul 31 08:16:49 GMT 2025
    - 3.2K bytes
    - Click Count (0)
  6. docs/en/docs/advanced/response-directly.md

    For example, you cannot put a Pydantic model in a `JSONResponse` without first converting it to a `dict` with all the data types (like `datetime`, `UUID`, etc) converted to JSON-compatible types.
    
    For those cases, you can use the `jsonable_encoder` to convert your data before passing it to a response:
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 05 18:13:19 GMT 2026
    - 4K bytes
    - Click Count (0)
  7. android/guava-tests/test/com/google/common/collect/MapsTest.java

        assertEquals((Integer) 2, converter.convert("two"));
        assertThrows(IllegalArgumentException.class, () -> converter.convert("three"));
    
        biMap.put("three", 3);
    
        assertEquals((Integer) 1, converter.convert("one"));
        assertEquals((Integer) 2, converter.convert("two"));
        assertEquals((Integer) 3, converter.convert("three"));
      }
    
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Fri Mar 13 13:01:07 GMT 2026
    - 63.2K bytes
    - Click Count (0)
  8. src/main/java/org/codelibs/core/beans/PropertyDesc.java

         */
        void setValue(Object target, Object value);
    
        /**
         * Converts the value to the appropriate type if necessary based on the property type.
         *
         * @param <T>
         *            the converted type
         * @param value
         *            the value to be converted
         * @return the converted value
         */
        <T> T convertIfNeed(Object value);
    
        /**
    Created: Fri Apr 03 20:58:12 GMT 2026
    - Last Modified: Sat May 10 01:32:17 GMT 2025
    - 4.3K bytes
    - Click Count (0)
  9. guava/src/com/google/common/base/Enums.java

            constants = populateCache(enumClass);
          }
          return constants;
        }
      }
    
      /**
       * Returns a serializable converter that converts between strings and {@code enum} values of type
       * {@code enumClass} using {@link Enum#valueOf(Class, String)} and {@link Enum#name()}. The
       * converter will throw an {@code IllegalArgumentException} if the argument is not the name of any
       * enum constant in the specified enum.
       *
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Tue Jul 01 13:41:58 GMT 2025
    - 4.8K bytes
    - Click Count (0)
  10. docs/pt/docs/tutorial/encoder.md

    Por exemplo, ele não recebe objetos `datetime`, pois estes objetos não são compatíveis com JSON.
    
    Então, um objeto `datetime` teria que ser convertido em um `str` contendo os dados no [formato ISO](https://en.wikipedia.org/wiki/ISO_8601).
    
    Da mesma forma, este banco de dados não receberia um modelo Pydantic (um objeto com atributos), apenas um `dict`.
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 19 18:20:43 GMT 2026
    - 1.7K bytes
    - Click Count (0)
Back to Top