Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 55 for generic (1.68 sec)

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

      }
    
      /**
       * Returns a fresh instance for {@code type} if possible. The returned instance could be:
       *
       * <ul>
       *   <li>exactly of the given type, including generic type parameters, such as {@code
       *       ImmutableList<String>};
       *   <li>of the raw type;
       *   <li>null if no value can be generated.
       * </ul>
       */
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Apr 17 16:33:44 GMT 2024
    - 28K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/collect/OrderingTest.java

        }
    
        void testIsOrdered() {
          assertTrue(ordering.isOrdered(strictlyOrderedList));
          assertTrue(ordering.isStrictlyOrdered(strictlyOrderedList));
        }
    
        // generic arrays and unchecked cast
        void testMinAndMax() {
          List<T> shuffledList = Lists.newArrayList(strictlyOrderedList);
          shuffledList = shuffledCopy(shuffledList, new Random(5));
    
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Thu Mar 07 18:34:03 GMT 2024
    - 42.5K bytes
    - Viewed (0)
  3. android/guava-tests/test/com/google/common/collect/OrderingTest.java

        }
    
        void testIsOrdered() {
          assertTrue(ordering.isOrdered(strictlyOrderedList));
          assertTrue(ordering.isStrictlyOrdered(strictlyOrderedList));
        }
    
        // generic arrays and unchecked cast
        void testMinAndMax() {
          List<T> shuffledList = Lists.newArrayList(strictlyOrderedList);
          shuffledList = shuffledCopy(shuffledList, new Random(5));
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Mar 07 18:34:03 GMT 2024
    - 42.5K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/reflect/Types.java

        }
      }
    
      /** Returns the {@code Class} object of arrays with {@code componentType}. */
      static Class<?> getArrayClass(Class<?> componentType) {
        // TODO(user): This is not the most efficient way to handle generic
        // arrays, but is there another way to extract the array class in a
        // non-hacky way (i.e. using String value class names- "[L...")?
        return Array.newInstance(componentType, 0).getClass();
      }
    
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Apr 17 16:33:44 GMT 2024
    - 23.1K bytes
    - Viewed (0)
  5. guava-testlib/src/com/google/common/testing/FreshValueGenerator.java

      }
    
      /**
       * Returns a fresh instance for {@code type} if possible. The returned instance could be:
       *
       * <ul>
       *   <li>exactly of the given type, including generic type parameters, such as {@code
       *       ImmutableList<String>};
       *   <li>of the raw type;
       *   <li>null if no value can be generated.
       * </ul>
       */
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Apr 17 16:33:44 GMT 2024
    - 28.6K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/util/concurrent/ClosingFuture.java

          Class<X> exceptionType, ClosingFunction<? super X, ? extends V> fallback, Executor executor) {
        return catchingMoreGeneric(exceptionType, fallback, executor);
      }
    
      // Avoids generic type capture inconsistency problems where |? extends V| is incompatible with V.
      private <X extends Throwable, W extends V> ClosingFuture<V> catchingMoreGeneric(
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 98.5K bytes
    - Viewed (0)
  7. android/guava-tests/test/com/google/common/collect/ImmutableListTest.java

      }
    
      public void testCreation_withNull() {
        try {
          ImmutableList.of("a", null, "b");
          fail();
        } catch (NullPointerException expected) {
        }
      }
    
      public void testCreation_generic() {
        List<String> a = ImmutableList.of("a");
        // only verify that there is no compile warning
        ImmutableList<List<String>> unused = ImmutableList.of(a, a);
      }
    
      public void testCreation_arrayOfArray() {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Mar 07 18:34:03 GMT 2024
    - 23.9K bytes
    - Viewed (0)
  8. guava-tests/test/com/google/common/collect/AbstractImmutableSetTest.java

        Collection<String> c = MinimalCollection.of("a", "a", "a");
        Set<String> set = copyOf(c);
        assertEquals(Collections.singleton("a"), set);
      }
    
      public void testCopyOf_collection_general() {
        Collection<String> c = MinimalCollection.of("a", "b", "a");
        Set<String> set = copyOf(c);
        assertEquals(2, set.size());
        assertTrue(set.contains("a"));
        assertTrue(set.contains("b"));
      }
    
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Thu Mar 07 18:34:03 GMT 2024
    - 18.7K bytes
    - Viewed (0)
  9. android/guava-tests/test/com/google/common/collect/AbstractImmutableSetTest.java

        Collection<String> c = MinimalCollection.of("a", "a", "a");
        Set<String> set = copyOf(c);
        assertEquals(Collections.singleton("a"), set);
      }
    
      public void testCopyOf_collection_general() {
        Collection<String> c = MinimalCollection.of("a", "b", "a");
        Set<String> set = copyOf(c);
        assertEquals(2, set.size());
        assertTrue(set.contains("a"));
        assertTrue(set.contains("b"));
      }
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Mar 07 18:34:03 GMT 2024
    - 18.7K bytes
    - Viewed (0)
  10. android/guava/src/com/google/common/collect/Comparators.java

       * {@code [1]} and {@code [1, 1]}).
       */
      // Note: 90% of the time we don't add type parameters or wildcards that serve only to "tweak" the
      // desired return type. However, *nested* generics introduce a special class of problems that we
      // think tip it over into being worthwhile.
      public static <T extends @Nullable Object, S extends T> Comparator<Iterable<S>> lexicographical(
          Comparator<T> comparator) {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed May 01 18:44:57 GMT 2024
    - 10.2K bytes
    - Viewed (0)
Back to top