code: public static <T> UnmodifiableIterator<T> forEnumeration(final Enumeration<T> enumeration) {
      checkNotNull(enumeration);
      return new UnmodifiableIterator<T>() {
        @Override
        public boolean hasNext() {
          return enumeration.hasMoreElements();
        }
  
        @Override
        public T next() {
          return enumeration.nextElement();
        }
      };
    }
docs: Adapts an {@code Enumeration} to the {@code Iterator} interface.
  
  <p>This method has no equivalent in {@link Iterables} because viewing an {@code Enumeration} as
  an {@code Iterable} is impossible. However, the contents can be <i>copied</i> into a collection
  using {@link Collections#list}.