org.virbo.dataset
Class IndexListDataSetIterator
java.lang.Object
org.virbo.dataset.IndexListDataSetIterator
- All Implemented Interfaces:
- DataSetIterator
public class IndexListDataSetIterator
- extends java.lang.Object
- implements DataSetIterator
Method Summary |
double |
getValue(QDataSet ds)
get the value from ds at the current iterator position. |
boolean |
hasNext()
|
int |
index(int dim)
|
int |
length(int dim)
|
void |
next()
|
void |
putValue(WritableDataSet ds,
double v)
replace the value in ds at the current iterator position. |
int |
rank()
return the rank of the dataset which the iterator will walk through. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
IndexListDataSetIterator
public IndexListDataSetIterator(QDataSet indeces)
hasNext
public boolean hasNext()
- Specified by:
hasNext
in interface DataSetIterator
index
public int index(int dim)
- Specified by:
index
in interface DataSetIterator
length
public int length(int dim)
- Specified by:
length
in interface DataSetIterator
next
public void next()
- Specified by:
next
in interface DataSetIterator
rank
public int rank()
- Description copied from interface:
DataSetIterator
- return the rank of the dataset which the iterator will walk through.
Note this needn't be the same rank as the dataset!
- Specified by:
rank
in interface DataSetIterator
- Returns:
getValue
public final double getValue(QDataSet ds)
- get the value from ds at the current iterator position.
- Specified by:
getValue
in interface DataSetIterator
- Parameters:
ds
- a dataset with capatible geometry as the iterator's geometry.
- Returns:
- the value of ds at the current iterator position.
putValue
public final void putValue(WritableDataSet ds,
double v)
- replace the value in ds at the current iterator position.
- Specified by:
putValue
in interface DataSetIterator
- Parameters:
ds
- a writable dataset with capatible geometry as the iterator's geometry.v
- the value to insert.
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object