public Iterator < DataPoint > getDataPointIterator ( ) { Iterator < DataPoint > iteData = new Iterator < DataPoint > ( ) { int cur = 0 ; int to = size ( ) ; @ Override public boolean hasNext ( ) { return cur < to ; } @ Override public DataPoint next ( ) { return getDataPoint ( cur ++ ) ; } @ Override public void remove ( ) { throw new UnsupportedOperationException ( "This operation is not supported for DataSet" ) ; } } ; return iteData ; }
Returns an iterator that will iterate over all data points in the set . The behavior is not defined if one attempts to modify the data set while being iterated .