code: @NullSafe
    public static <T> Iterator<T> asIterator(Enumeration<T> enumeration) {
  
      return (enumeration == null ? Collections.emptyIterator() : new Iterator<T>() {
  
        @Override
        public boolean hasNext() {
          return enumeration.hasMoreElements();
        }
  
        @Override
        public T next() {
          return enumeration.nextElement();
        }
      });
    }
docs: Adapts the {@link Enumeration} into an instance of the {@link Iterator} interface.
  
  @param <T> Class type of the elements in the {@link Enumeration}.
  @param enumeration {@link Enumeration} to adapt into an {@link Iterator}.
  @return an {@link Iterator} implementation iterating over the elements in the {@link Enumeration}.
  @see java.util.Collections#emptyIterator()
  @see #asEnumeration(java.util.Iterator)
  @see java.util.Enumeration
  @see java.util.Iterator