Class DoubleIterators.UnmodifiableIterator

  • All Implemented Interfaces:
    DoubleIterator, java.util.Iterator<java.lang.Double>, java.util.PrimitiveIterator<java.lang.Double,​java.util.function.DoubleConsumer>, java.util.PrimitiveIterator.OfDouble
    Enclosing class:
    DoubleIterators

    public static class DoubleIterators.UnmodifiableIterator
    extends java.lang.Object
    implements DoubleIterator
    An unmodifiable wrapper class for iterators.
    • Nested Class Summary

      • Nested classes/interfaces inherited from interface java.util.PrimitiveIterator

        java.util.PrimitiveIterator.OfDouble, java.util.PrimitiveIterator.OfInt, java.util.PrimitiveIterator.OfLong
    • Constructor Detail

      • UnmodifiableIterator

        public UnmodifiableIterator​(DoubleIterator i)
    • Method Detail

      • hasNext

        public boolean hasNext()
        Specified by:
        hasNext in interface java.util.Iterator<java.lang.Double>
      • nextDouble

        public double nextDouble()
        Description copied from interface: DoubleIterator
        Returns the next element as a primitive type.
        Specified by:
        nextDouble in interface DoubleIterator
        Specified by:
        nextDouble in interface java.util.PrimitiveIterator.OfDouble
        Returns:
        the next element in the iteration.
        See Also:
        Iterator.next()
      • forEachRemaining

        public void forEachRemaining​(java.util.function.DoubleConsumer action)
        Specified by:
        forEachRemaining in interface java.util.PrimitiveIterator<java.lang.Double,​java.util.function.DoubleConsumer>
        Specified by:
        forEachRemaining in interface java.util.PrimitiveIterator.OfDouble
      • forEachRemaining

        @Deprecated
        public void forEachRemaining​(java.util.function.Consumer<? super java.lang.Double> action)
        Deprecated.
        Description copied from interface: DoubleIterator
        Specified by:
        forEachRemaining in interface DoubleIterator
        Specified by:
        forEachRemaining in interface java.util.Iterator<java.lang.Double>
        Specified by:
        forEachRemaining in interface java.util.PrimitiveIterator.OfDouble