code: @NullSafe
    @SafeVarargs
    public static <T> Enumeration<T> asEnumeration(T... array) {
  
      return (array == null ? Collections.emptyEnumeration() : new Enumeration<T>() {
  
        private int index = 0;
  
        @Override
        public boolean hasMoreElements() {
          return (index < array.length);
        }
  
        @Override
        public T nextElement() {
  
          Assert.isTrue(hasMoreElements(), new NoSuchElementException("No more elements"));
  
          return array[index++];
        }
      });
    }
docs: Returns an {@link Enumeration} enumerating over the elements in the array.
  
  @param <T> Class type of the elements in the array.
  @param array array to enumerate.
  @return an {@link Enumeration} over the elements in the array or an empty {@link Enumeration}
  if the array is null or empty.
  @see java.util.Enumeration