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