Class PositionToBeanField.PositionIterator

  • All Implemented Interfaces:
    java.util.Iterator<FieldMapByPositionEntry<T>>
    Enclosing class:
    PositionToBeanField<T>

    private class PositionToBeanField.PositionIterator
    extends java.lang.Object
    implements java.util.Iterator<FieldMapByPositionEntry<T>>
    This iterator is designed to iterate over every element of all of the ranges specified in the containing class.

    There is no guaranteed order.

    There is one exception to returning all values: if a range ends at Integer.MAX_VALUE, only the minimum in the range is returned. This is to prevent a loop that for all practical purposes might as well be infinite. Unless someone foolishly specifies Integer.MAX_VALUE as a column position, this only occurs after reading in ranges and before the first line of the input is read. There is no reason in the opencsv code to iterate at this point, and it is not done. There should be no reason for user code to use this iterator at all, but if it does, the user is herewith warned.

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private org.apache.commons.lang3.Range<java.lang.Integer> currentRange  
      private int position  
      private java.util.ListIterator<org.apache.commons.lang3.Range<java.lang.Integer>> rangeIterator  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean hasNext()  
      FieldMapByPositionEntry<T> next()  
      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

        forEachRemaining
    • Field Detail

      • rangeIterator

        private java.util.ListIterator<org.apache.commons.lang3.Range<java.lang.Integer>> rangeIterator
      • currentRange

        private org.apache.commons.lang3.Range<java.lang.Integer> currentRange
      • position

        private int position
    • Constructor Detail

      • PositionIterator

        PositionIterator()