org.mbari.siam.core
Class DeviceLogIterator

java.lang.Object
  extended by org.mbari.siam.core.DeviceLogIterator
All Implemented Interfaces:
java.util.Iterator

public class DeviceLogIterator
extends java.lang.Object
implements java.util.Iterator

DeviceLogIterator iterates over DevicePackets stored in a DeviceLog. NOTE: This implementation is not thread-safe!

Author:
Tom O'Reilly

Constructor Summary
DeviceLogIterator(DeviceLog log)
          Create iterator, passing in DeviceLog on which to iterate.
DeviceLogIterator(DeviceLog log, long start)
          Create iterator, passing in DeviceLog on which to iterate and specify a start time so that a binary search can be done (by getEntryIndex) to quickly find the first record.
 
Method Summary
 boolean hasNext()
          Returns true if DeviceLog has more packets.
 java.lang.Object next()
          Returns next DevicePacket from DeviceLog.
 void remove()
          Not supported.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DeviceLogIterator

public DeviceLogIterator(DeviceLog log,
                         long start)
Create iterator, passing in DeviceLog on which to iterate and specify a start time so that a binary search can be done (by getEntryIndex) to quickly find the first record.


DeviceLogIterator

public DeviceLogIterator(DeviceLog log)
Create iterator, passing in DeviceLog on which to iterate.

Method Detail

hasNext

public boolean hasNext()
Returns true if DeviceLog has more packets.

Specified by:
hasNext in interface java.util.Iterator

next

public java.lang.Object next()
                      throws java.util.NoSuchElementException
Returns next DevicePacket from DeviceLog.

Specified by:
next in interface java.util.Iterator
Throws:
java.util.NoSuchElementException

remove

public void remove()
            throws java.lang.UnsupportedOperationException,
                   java.lang.IllegalStateException
Not supported.

Specified by:
remove in interface java.util.Iterator
Throws:
java.lang.UnsupportedOperationException
java.lang.IllegalStateException


Copyright © 2003 MBARI.

The Monterey Bay Aquarium Research Institute (MBARI) provides this documentation and code "as is", with no warranty, express or implied, of its quality or consistency. It is provided without support and without obligation on the part of MBARI to assist in its use, correction, modification, or enhancement.