Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for asEnumeration (0.07 sec)

  1. guava-tests/test/com/google/common/collect/IteratorsTest.java

        Enumeration<Integer> enumer = Iterators.asEnumeration(iter);
    
        assertFalse(enumer.hasMoreElements());
        assertThrows(NoSuchElementException.class, () -> enumer.nextElement());
      }
    
      public void testAsEnumerationSingleton() {
        Iterator<Integer> iter = ImmutableList.of(1).iterator();
        Enumeration<Integer> enumer = Iterators.asEnumeration(iter);
    
        assertTrue(enumer.hasMoreElements());
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Tue Oct 28 18:44:53 UTC 2025
    - 56.7K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/collect/MapsTest.java

      public void testFromPropertiesNullKey() {
        Properties properties =
            new Properties() {
              @Override
              public Enumeration<?> propertyNames() {
                return Iterators.asEnumeration(asList(null, "first", "second").iterator());
              }
            };
        properties.setProperty("first", "true");
        properties.setProperty("second", "null");
    
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Thu Dec 11 22:56:33 UTC 2025
    - 62.7K bytes
    - Viewed (0)
  3. guava/src/com/google/common/collect/Iterators.java

       * you have a {@link Collection}), or {@code Iterators.asEnumeration(collection.iterator())}.
       */
      // This is an adapter for cases in which users do need an Enumeration for whatever reason.
      @SuppressWarnings("JdkObsolete")
      public static <T extends @Nullable Object> Enumeration<T> asEnumeration(Iterator<T> iterator) {
        checkNotNull(iterator);
        return new Enumeration<T>() {
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Tue Sep 16 12:42:11 UTC 2025
    - 51.4K bytes
    - Viewed (0)
  4. guava-tests/test/com/google/common/collect/MapsTest.java

      public void testFromPropertiesNullKey() {
        Properties properties =
            new Properties() {
              @Override
              public Enumeration<?> propertyNames() {
                return Iterators.asEnumeration(asList(null, "first", "second").iterator());
              }
            };
        properties.setProperty("first", "true");
        properties.setProperty("second", "null");
    
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Thu Dec 11 22:56:33 UTC 2025
    - 65K bytes
    - Viewed (0)
Back to top