Package nz.org.riskscape.hdf5.cursor
Class H5FixedSizeCursor
java.lang.Object
nz.org.riskscape.hdf5.cursor.H5DatasetCursor
nz.org.riskscape.hdf5.cursor.H5FixedSizeCursor
Iterates over elements of an H5Dataset
-
Nested Class Summary
Nested classes/interfaces inherited from class nz.org.riskscape.hdf5.cursor.H5DatasetCursor
H5DatasetCursor.LocalProblems -
Field Summary
Fields inherited from class nz.org.riskscape.hdf5.cursor.H5DatasetCursor
dataset, dataspace, numElements, PROBLEMS, type -
Constructor Summary
ConstructorsConstructorDescriptionH5FixedSizeCursor(H5Dataset dataset, H5DataSpace ds, H5Type type, int cursorBufferSize) -
Method Summary
Modifier and TypeMethodDescriptionlongGets the current position of the cursor within the dataset elements.booleanhasNext()next()peek()Same asIterator.next()but the cursor position is not changed.peek(H5CompoundMember member) Read the data for member only.voidrewind()voidsetCurrentIndex(long index) Resets the position of the cursor to the given element index.voidskip()Advances the cursor index one step.Methods inherited from class nz.org.riskscape.hdf5.cursor.H5DatasetCursor
size, sizeAsIntMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Iterator
forEachRemaining, remove
-
Constructor Details
-
H5FixedSizeCursor
-
-
Method Details
-
hasNext
public boolean hasNext() -
rewind
public void rewind() -
setCurrentIndex
public void setCurrentIndex(long index) Description copied from class:H5DatasetCursorResets the position of the cursor to the given element index.
- Specified by:
setCurrentIndexin classH5DatasetCursor- Parameters:
index- the index of the element that should be returned by next()
-
next
-
peek
Description copied from class:H5DatasetCursorSame as
Iterator.next()but the cursor position is not changed.- Specified by:
peekin classH5DatasetCursor- Returns:
- object read from the current cursor position
-
peek
Description copied from class:H5DatasetCursorRead the data for member only. This can be more efficient than reading the data with
Iterator.next(). Peeking does not affect the cursor position.Note that it is up to the caller to ensure that member is in fact a member of this cursor's data type. If it it not then unexpected results are likely.
- Specified by:
peekin classH5DatasetCursor- Parameters:
member- member to read- Returns:
- the value of member at the current cursor position
-
skip
public void skip()Description copied from class:H5DatasetCursorAdvances the cursor index one step. Similar to calling
Iterator.next()but without unmarshalling any data- Specified by:
skipin classH5DatasetCursor
-
getByteBuffer
-
getCurrentIndex
public long getCurrentIndex()Description copied from class:H5DatasetCursorGets the current position of the cursor within the dataset elements.
- Specified by:
getCurrentIndexin classH5DatasetCursor- Returns:
- the index of the element that will be returned by next()
-