org.apache.commons.math.linear

## Class OpenMapRealVector.OpenMapSparseIterator

- java.lang.Object
- - org.apache.commons.math.linear.OpenMapRealVector.OpenMapSparseIterator

All Implemented Interfaces:
  java.util.Iterator<RealVector.Entry>

Enclosing class:
  OpenMapRealVector

    protected class OpenMapRealVector.OpenMapSparseIterator
    extends java.lang.Object
    implements java.util.Iterator<RealVector.Entry>

Iterator class to do iteration over just the non-zero elements.

This implementation is fail-fast, so cannot be used to modify any zero element.

### Field Summary

Fields
`private RealVector.Entry` `current` Current entry.
`private OpenIntToDoubleHashMap.Iterator` `iter` Underlying iterator.

### Constructor Summary

Constructors
`protected` `OpenMapRealVector.OpenMapSparseIterator()` Simple constructor.

### Method Summary

Methods
`boolean` `hasNext()`
`RealVector.Entry` `next()`
`void` `remove()`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### iter

    private final OpenIntToDoubleHashMap.Iterator iter

Underlying iterator.

#### current

    private final RealVector.Entry current

Current entry.

### Constructor Detail

#### OpenMapRealVector.OpenMapSparseIterator

    protected OpenMapRealVector.OpenMapSparseIterator()

Simple constructor.

### Method Detail

#### hasNext

    public boolean hasNext()

Specified by:
  `hasNext` in interface `java.util.Iterator<RealVector.Entry>`

#### next

    public RealVector.Entry next()

Specified by:
  `next` in interface `java.util.Iterator<RealVector.Entry>`

#### remove

    public void remove()

Specified by:
  `remove` in interface `java.util.Iterator<RealVector.Entry>`