Package ucar.ma2

Class IteratorFast

  • All Implemented Interfaces:
    IndexIterator

    public class IteratorFast
    extends Object
    implements IndexIterator
    A "fast" iterator that can be used when the data is in canonical order.
    • Method Detail

      • hasNext

        public boolean hasNext()
        Description copied from interface: IndexIterator
        Return true if there are more elements in the iteration.
        Specified by:
        hasNext in interface IndexIterator
        Returns:
        true if there are more elements in the iteration.
      • hasMore

        public boolean hasMore​(int howMany)
      • getCurrentCounter

        public int[] getCurrentCounter()
        Description copied from interface: IndexIterator
        Get the current counter, use for debugging
        Specified by:
        getCurrentCounter in interface IndexIterator
        Returns:
        the current counter, use for debugging
      • getDoubleCurrent

        public double getDoubleCurrent()
        Description copied from interface: IndexIterator
        Get current value as a double
        Specified by:
        getDoubleCurrent in interface IndexIterator
        Returns:
        current value as a double
      • getDoubleNext

        public double getDoubleNext()
        Description copied from interface: IndexIterator
        Get next value as a double
        Specified by:
        getDoubleNext in interface IndexIterator
        Returns:
        next value as a double
      • setDoubleCurrent

        public void setDoubleCurrent​(double val)
        Description copied from interface: IndexIterator
        Set current value with a double
        Specified by:
        setDoubleCurrent in interface IndexIterator
        Parameters:
        val - the current value as a double
      • setDoubleNext

        public void setDoubleNext​(double val)
        Description copied from interface: IndexIterator
        Set next value with a double
        Specified by:
        setDoubleNext in interface IndexIterator
        Parameters:
        val - the next value as a double
      • getFloatCurrent

        public float getFloatCurrent()
        Description copied from interface: IndexIterator
        Get current value as a float
        Specified by:
        getFloatCurrent in interface IndexIterator
        Returns:
        current value as a float
      • getFloatNext

        public float getFloatNext()
        Description copied from interface: IndexIterator
        Get next value as a float
        Specified by:
        getFloatNext in interface IndexIterator
        Returns:
        next value as a float
      • setFloatCurrent

        public void setFloatCurrent​(float val)
        Description copied from interface: IndexIterator
        Set current value with a float
        Specified by:
        setFloatCurrent in interface IndexIterator
        Parameters:
        val - the current value as a float
      • setFloatNext

        public void setFloatNext​(float val)
        Description copied from interface: IndexIterator
        Set next value with a float
        Specified by:
        setFloatNext in interface IndexIterator
        Parameters:
        val - the next value as a float
      • getLongCurrent

        public long getLongCurrent()
        Description copied from interface: IndexIterator
        Get current value as a long
        Specified by:
        getLongCurrent in interface IndexIterator
        Returns:
        current value as a long
      • getLongNext

        public long getLongNext()
        Description copied from interface: IndexIterator
        Get next value as a long
        Specified by:
        getLongNext in interface IndexIterator
        Returns:
        next value as a long
      • setLongCurrent

        public void setLongCurrent​(long val)
        Description copied from interface: IndexIterator
        Set current value with a long
        Specified by:
        setLongCurrent in interface IndexIterator
        Parameters:
        val - the current value as a long
      • setLongNext

        public void setLongNext​(long val)
        Description copied from interface: IndexIterator
        Set next value with a long
        Specified by:
        setLongNext in interface IndexIterator
        Parameters:
        val - the next value as a long
      • getIntCurrent

        public int getIntCurrent()
        Description copied from interface: IndexIterator
        Get current value as a int
        Specified by:
        getIntCurrent in interface IndexIterator
        Returns:
        current value as a int
      • getIntNext

        public int getIntNext()
        Description copied from interface: IndexIterator
        Get next value as a int
        Specified by:
        getIntNext in interface IndexIterator
        Returns:
        next value as a int
      • setIntCurrent

        public void setIntCurrent​(int val)
        Description copied from interface: IndexIterator
        Set current value with a int
        Specified by:
        setIntCurrent in interface IndexIterator
        Parameters:
        val - the current value as a int
      • setIntNext

        public void setIntNext​(int val)
        Description copied from interface: IndexIterator
        Set next value with a int
        Specified by:
        setIntNext in interface IndexIterator
        Parameters:
        val - the next value as a int
      • getShortCurrent

        public short getShortCurrent()
        Description copied from interface: IndexIterator
        Get current value as a short
        Specified by:
        getShortCurrent in interface IndexIterator
        Returns:
        current value as a short
      • getShortNext

        public short getShortNext()
        Description copied from interface: IndexIterator
        Get next value as a short
        Specified by:
        getShortNext in interface IndexIterator
        Returns:
        next value as a short
      • setShortCurrent

        public void setShortCurrent​(short val)
        Description copied from interface: IndexIterator
        Set current value with a short
        Specified by:
        setShortCurrent in interface IndexIterator
        Parameters:
        val - the current value as a short
      • setShortNext

        public void setShortNext​(short val)
        Description copied from interface: IndexIterator
        Set next value with a short
        Specified by:
        setShortNext in interface IndexIterator
        Parameters:
        val - the next value as a short
      • getByteCurrent

        public byte getByteCurrent()
        Description copied from interface: IndexIterator
        Get current value as a byte
        Specified by:
        getByteCurrent in interface IndexIterator
        Returns:
        current value as a byte
      • getByteNext

        public byte getByteNext()
        Description copied from interface: IndexIterator
        Get next value as a byte
        Specified by:
        getByteNext in interface IndexIterator
        Returns:
        next value as a byte
      • setByteCurrent

        public void setByteCurrent​(byte val)
        Description copied from interface: IndexIterator
        Set current value with a byte
        Specified by:
        setByteCurrent in interface IndexIterator
        Parameters:
        val - the current value as a byte
      • setByteNext

        public void setByteNext​(byte val)
        Description copied from interface: IndexIterator
        Set next value with a byte
        Specified by:
        setByteNext in interface IndexIterator
        Parameters:
        val - the next value as a byte
      • getCharCurrent

        public char getCharCurrent()
        Description copied from interface: IndexIterator
        Get current value as a char
        Specified by:
        getCharCurrent in interface IndexIterator
        Returns:
        current value as a char
      • getCharNext

        public char getCharNext()
        Description copied from interface: IndexIterator
        Get next value as a char
        Specified by:
        getCharNext in interface IndexIterator
        Returns:
        next value as a char
      • setCharCurrent

        public void setCharCurrent​(char val)
        Description copied from interface: IndexIterator
        Set current value with a char
        Specified by:
        setCharCurrent in interface IndexIterator
        Parameters:
        val - the current value as a char
      • setCharNext

        public void setCharNext​(char val)
        Description copied from interface: IndexIterator
        Set next value with a char
        Specified by:
        setCharNext in interface IndexIterator
        Parameters:
        val - the next value as a char
      • getBooleanCurrent

        public boolean getBooleanCurrent()
        Description copied from interface: IndexIterator
        Get current value as a boolean
        Specified by:
        getBooleanCurrent in interface IndexIterator
        Returns:
        current value as a boolean
      • getBooleanNext

        public boolean getBooleanNext()
        Description copied from interface: IndexIterator
        Get next value as a boolean
        Specified by:
        getBooleanNext in interface IndexIterator
        Returns:
        next value as a boolean
      • setBooleanCurrent

        public void setBooleanCurrent​(boolean val)
        Description copied from interface: IndexIterator
        Set current value with a boolean
        Specified by:
        setBooleanCurrent in interface IndexIterator
        Parameters:
        val - the current value as a boolean
      • setBooleanNext

        public void setBooleanNext​(boolean val)
        Description copied from interface: IndexIterator
        Set next value with a boolean
        Specified by:
        setBooleanNext in interface IndexIterator
        Parameters:
        val - the next value as a boolean
      • setObjectCurrent

        public void setObjectCurrent​(Object val)
        Description copied from interface: IndexIterator
        Set current value with a Object
        Specified by:
        setObjectCurrent in interface IndexIterator
        Parameters:
        val - the current value as a Object
      • setObjectNext

        public void setObjectNext​(Object val)
        Description copied from interface: IndexIterator
        Set next value with a Object
        Specified by:
        setObjectNext in interface IndexIterator
        Parameters:
        val - the next value as a Object
      • next

        public Object next()
        Description copied from interface: IndexIterator
        Get next value as an Object
        Specified by:
        next in interface IndexIterator
        Returns:
        next value as an Object