Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 10 of 78 for newtype (0.1 seconds)

  1. guava-tests/test/com/google/common/net/MediaTypeTest.java

        MediaType newType = MediaType.createApplicationType("yams");
        assertThat(newType.type()).isEqualTo("application");
        assertThat(newType.subtype()).isEqualTo("yams");
      }
    
      public void testCreateAudioType() {
        MediaType newType = MediaType.createAudioType("yams");
        assertThat(newType.type()).isEqualTo("audio");
        assertThat(newType.subtype()).isEqualTo("yams");
      }
    
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Tue Mar 17 16:11:48 GMT 2026
    - 20.4K bytes
    - Click Count (0)
  2. fastapi/_compat/v2.py

        # definitions: dict[DefsRef, dict[str, Any]]
        # but mypy complains about general str in other places that are not declared as
        # DefsRef, although DefsRef is just str:
        # DefsRef = NewType('DefsRef', str)
        # So, a cast to simplify the types here
        return field_mapping, cast(dict[str, dict[str, Any]], definitions)
    
    
    def is_scalar_field(field: ModelField) -> bool:
        from fastapi import params
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Sun Mar 15 11:44:39 GMT 2026
    - 16.7K bytes
    - Click Count (0)
  3. android/guava/src/com/google/common/collect/FluentIterable.java

       * unchecked cast at some later point:
       *
       * {@snippet :
       * @SuppressWarnings("unchecked") // safe because of ::isInstance check
       * ImmutableList<NewType> result =
       *     (ImmutableList) stream.filter(NewType.class::isInstance).collect(toImmutableList());
       * }
       */
      @GwtIncompatible // Class.isInstance
      public final <T> FluentIterable<T> filter(Class<T> type) {
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Thu Apr 02 14:49:41 GMT 2026
    - 34.7K bytes
    - Click Count (0)
  4. guava/src/com/google/common/collect/FluentIterable.java

       * unchecked cast at some later point:
       *
       * {@snippet :
       * @SuppressWarnings("unchecked") // safe because of ::isInstance check
       * ImmutableList<NewType> result =
       *     (ImmutableList) stream.filter(NewType.class::isInstance).collect(toImmutableList());
       * }
       */
      @GwtIncompatible // Class.isInstance
      public final <T> FluentIterable<T> filter(Class<T> type) {
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Thu Apr 02 14:49:41 GMT 2026
    - 34.7K bytes
    - Click Count (0)
  5. guava/src/com/google/common/collect/Iterables.java

       * unchecked cast at some later point:
       *
       * {@snippet :
       * @SuppressWarnings("unchecked") // safe because of ::isInstance check
       * ImmutableList<NewType> result =
       *     (ImmutableList) stream.filter(NewType.class::isInstance).collect(toImmutableList());
       * }
       */
      @SuppressWarnings("unchecked")
      @GwtIncompatible // Class.isInstance
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Sun Mar 08 16:16:42 GMT 2026
    - 43.6K bytes
    - Click Count (0)
  6. android/guava-tests/test/com/google/common/reflect/TypeTokenResolutionTest.java

        assertEquals(valueType, TypeToken.of(valueType).resolveType(valueType).getType());
      }
    
      private static final class GenericArray<T> {
        final Type t = new TypeToken<T>(getClass()) {}.getType();
        final Type array = new TypeToken<T[]>(getClass()) {}.getType();
      }
    
      public void testGenericArrayType() {
        GenericArray<?> genericArray = new GenericArray<>();
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Thu Mar 12 17:47:10 GMT 2026
    - 19.6K bytes
    - Click Count (0)
  7. guava-tests/test/com/google/common/reflect/TypeTokenResolutionTest.java

        assertEquals(valueType, TypeToken.of(valueType).resolveType(valueType).getType());
      }
    
      private static final class GenericArray<T> {
        final Type t = new TypeToken<T>(getClass()) {}.getType();
        final Type array = new TypeToken<T[]>(getClass()) {}.getType();
      }
    
      public void testGenericArrayType() {
        GenericArray<?> genericArray = new GenericArray<>();
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Thu Mar 12 17:47:10 GMT 2026
    - 19.6K bytes
    - Click Count (0)
  8. guava-tests/test/com/google/common/reflect/SubtypeTester.java

      private static Type getSupertype(Type type, Class<?> superclass) {
        Class rawType = superclass;
        return TypeToken.of(type).getSupertype(rawType).getType();
      }
    
      private static Type getSubtype(Type type, Class<?> subclass) {
        return TypeToken.of(type).getSubtype(subclass).getType();
      }
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Tue Mar 17 16:11:48 GMT 2026
    - 6.1K bytes
    - Click Count (0)
  9. guava-tests/test/com/google/common/reflect/TypeTokenTest.java

        assertTrue(
            from.getType() + " is expected to be assignable to " + to.getType(),
            to.isSupertypeOf(from));
        assertTrue(
            to.getType() + " is expected to be a supertype of " + from.getType(),
            to.isSupertypeOf(from));
        assertTrue(
            from.getType() + " is expected to be a subtype of " + to.getType(), from.isSubtypeOf(to));
      }
    
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Fri Mar 13 13:01:07 GMT 2026
    - 89.3K bytes
    - Click Count (0)
  10. android/guava/src/com/google/common/reflect/TypeToken.java

          ParameterizedType type) {
        Class<?> rawType = (Class<?>) type.getRawType();
        TypeVariable<?>[] typeVars = rawType.getTypeParameters();
        Type[] typeArgs = type.getActualTypeArguments();
        for (int i = 0; i < typeArgs.length; i++) {
          typeArgs[i] = canonicalizeTypeArg(typeVars[i], typeArgs[i]);
        }
        return Types.newParameterizedTypeWithOwner(type.getOwnerType(), rawType, typeArgs);
      }
    
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Thu Jan 29 22:14:05 GMT 2026
    - 53.8K bytes
    - Click Count (0)
Back to Top