Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for asEnumeration (0.32 sec)

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

        assertFalse(iter.hasNext());
      }
    
      public void testAsEnumerationEmpty() {
        Iterator<Integer> iter = Iterators.emptyIterator();
        Enumeration<Integer> enumer = Iterators.asEnumeration(iter);
    
        assertFalse(enumer.hasMoreElements());
        try {
          enumer.nextElement();
          fail();
        } catch (NoSuchElementException expected) {
        }
      }
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue Apr 30 18:43:01 GMT 2024
    - 56.5K bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/collect/Iterators.java

       *
       * <p>The {@code Iterable} equivalent of this method is either {@link Collections#enumeration} (if
       * you have a {@link Collection}), or {@code Iterators.asEnumeration(collection.iterator())}.
       */
      public static <T extends @Nullable Object> Enumeration<T> asEnumeration(Iterator<T> iterator) {
        checkNotNull(iterator);
        return new Enumeration<T>() {
          @Override
          public boolean hasMoreElements() {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue Apr 30 18:43:01 GMT 2024
    - 51.1K bytes
    - Viewed (0)
Back to top