Class CalciteMetaImpl.LimitIterator<E>

  • Type Parameters:
    E - element type
    All Implemented Interfaces:
    Enclosing class:

    private static class CalciteMetaImpl.LimitIterator<E>
    extends java.lang.Object
    implements java.util.Iterator<E>
    Iterator that returns at most limit rows from an underlying Iterator.
    • Field Summary

      Modifier and Type Field Description
      (package private) int i  
      private java.util.Iterator<E> iterator  
      private long limit  
    • Constructor Summary

      Modifier Constructor Description
      private LimitIterator​(java.util.Iterator<E> iterator, long limit)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean hasNext()  
      E next()  
      (package private) static <E> java.util.Iterator<E> of​(java.util.Iterator<E> iterator, long limit)  
      void remove()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.util.Iterator

    • Field Detail

      • iterator

        private final java.util.Iterator<E> iterator
      • limit

        private final long limit
      • i

        int i
    • Constructor Detail

      • LimitIterator

        private LimitIterator​(java.util.Iterator<E> iterator,
                              long limit)
    • Method Detail

      • of

        static <E> java.util.Iterator<E> of​(java.util.Iterator<E> iterator,
                                            long limit)
      • hasNext

        public boolean hasNext()
        Specified by:
        hasNext in interface java.util.Iterator<E>
      • next

        public E next()
        Specified by:
        next in interface java.util.Iterator<E>
      • remove

        public void remove()
        Specified by:
        remove in interface java.util.Iterator<E>