code: public static <T> ObjIterator<T> limit(final Iterator<T> iter, final long count) {
          N.checkArgNotNegative(count, "count");
  
          if (iter == null || count == 0) {
              return ObjIterator.empty();
          }
  
          return new ObjIterator<T>() {
              private long cnt = count;
  
              @Override
              public boolean hasNext() {
                  return cnt > 0 && iter.hasNext();
              }
  
              @Override
              public T next() {
                  if (hasNext() == false) {
                      throw new NoSuchElementException();
                  }
  
                  cnt--;
                  return iter.next();
              }
          };
      }
docs: Returns a new {@code Iterator}
  
  @param iter
  @param count
  @return