code: private static <T> Stream<T> enumerationAsStream(Enumeration<? extends T> e)
      {
          Iterator<T> iterator = new Iterator<T>()
          {
              @Override
              public T next()
              {
                  return e.nextElement();
              }
  
              @Override
              public boolean hasNext()
              {
                  return e.hasMoreElements();
              }
          };
          return StreamSupport.stream(
              Spliterators.spliteratorUnknownSize(
                  iterator, Spliterator.ORDERED), false);
      }
docs: Returns a new stream that has the same contents as the given enumeration
  
  @param e The enumeration
  @return The stream