Class H5FixedSizeCursor

java.lang.Object
nz.org.riskscape.hdf5.cursor.H5DatasetCursor
nz.org.riskscape.hdf5.cursor.H5FixedSizeCursor
All Implemented Interfaces:
Iterator<Object>

public class H5FixedSizeCursor extends H5DatasetCursor

Iterates over elements of an H5Dataset

  • Constructor Details

  • Method Details

    • hasNext

      public boolean hasNext()
    • rewind

      public void rewind()
    • setCurrentIndex

      public void setCurrentIndex(long index)
      Description copied from class: H5DatasetCursor

      Resets the position of the cursor to the given element index.

      Specified by:
      setCurrentIndex in class H5DatasetCursor
      Parameters:
      index - the index of the element that should be returned by next()
    • next

      public Object next()
    • peek

      public Object peek()
      Description copied from class: H5DatasetCursor

      Same as Iterator.next() but the cursor position is not changed.

      Specified by:
      peek in class H5DatasetCursor
      Returns:
      object read from the current cursor position
    • peek

      public Object peek(H5CompoundMember member)
      Description copied from class: H5DatasetCursor

      Read 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:
      peek in class H5DatasetCursor
      Parameters:
      member - member to read
      Returns:
      the value of member at the current cursor position
    • skip

      public void skip()
      Description copied from class: H5DatasetCursor

      Advances the cursor index one step. Similar to calling Iterator.next() but without unmarshalling any data

      Specified by:
      skip in class H5DatasetCursor
    • getByteBuffer

      public ByteBuffer getByteBuffer()
    • getCurrentIndex

      public long getCurrentIndex()
      Description copied from class: H5DatasetCursor

      Gets the current position of the cursor within the dataset elements.

      Specified by:
      getCurrentIndex in class H5DatasetCursor
      Returns:
      the index of the element that will be returned by next()