Class IteratorModule.GroupedIterator<T>

    • Field Detail

      • size

        private final int size
      • step

        private final int step
      • gap

        private final int gap
      • preserve

        private final int preserve
      • buffer

        private java.lang.Object[] buffer
    • Constructor Detail

      • GroupedIterator

        GroupedIterator​(Iterator<T> that,
                        int size,
                        int step)
    • Method Detail

      • hasNext

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

        public Seq<T> next()
        Specified by:
        next in interface java.util.Iterator<T>
      • drop

        private static void drop​(Iterator<?> source,
                                 int count)
      • take

        private static java.lang.Object[] take​(Iterator<?> source,
                                               java.lang.Object[] target,
                                               int offset,
                                               int count)