gov.nasa.gsfc.drl.rtstps.core.output.hdf5.UnitTest
Class TimeSortedPacketReader

java.lang.Object
  extended by gov.nasa.gsfc.drl.rtstps.core.output.hdf5.UnitTest.TimeSortedPacketReader
All Implemented Interfaces:
java.util.Iterator<PacketI>

public class TimeSortedPacketReader
extends java.lang.Object
implements java.util.Iterator<PacketI>


Nested Class Summary
private  class TimeSortedPacketReader.DateWrappedPacket
           
private  class TimeSortedPacketReader.PacketDateComparator
           
private  class TimeSortedPacketReader.PacketTimeComparator
           
private  class TimeSortedPacketReader.TimeWrappedPacket
           
 
Field Summary
private  int currCount
           
private  java.util.Date currentDateTime
           
private  long currentTime
           
private  int halfFull
           
private  int maxPacketCount
           
private  PacketReaderI packetReader
           
private  java.util.TreeSet<TimeSortedPacketReader.TimeWrappedPacket> timeSortedPackets
           
 
Constructor Summary
TimeSortedPacketReader(PacketReaderI packetReader)
           
 
Method Summary
 boolean hasNext()
           
 PacketI next()
           
private  void readUntilFirstTimeFound()
           
 void remove()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

packetReader

private PacketReaderI packetReader

timeSortedPackets

private java.util.TreeSet<TimeSortedPacketReader.TimeWrappedPacket> timeSortedPackets

maxPacketCount

private int maxPacketCount

halfFull

private int halfFull

currentDateTime

private java.util.Date currentDateTime

currentTime

private long currentTime

currCount

private int currCount
Constructor Detail

TimeSortedPacketReader

TimeSortedPacketReader(PacketReaderI packetReader)
                 throws RtStpsException
Throws:
RtStpsException
Method Detail

readUntilFirstTimeFound

private void readUntilFirstTimeFound()
                              throws RtStpsException
Throws:
RtStpsException

hasNext

public boolean hasNext()
Specified by:
hasNext in interface java.util.Iterator<PacketI>

next

public PacketI next()
Specified by:
next in interface java.util.Iterator<PacketI>

remove

public void remove()
Specified by:
remove in interface java.util.Iterator<PacketI>