Package PamguardMVC
Class ChannelIterator<E extends PamDataUnit>
java.lang.Object
PamguardMVC.PamDataUnitIterator<E>
PamguardMVC.ChannelIterator<E>
- All Implemented Interfaces:
 Iterator<E>,ListIterator<E>
An iterator that has a bit more functionality than a basic iterator. 
It's main enhancement is to use a channel map match to PamDataUnits, so that it only returns data units that have an overlap in channels with the given channel map (which could be 0xFFFFFFFF).
It also has a couple of extra searches to getPreceeding() and getFollowing() data units.
This class specifically matches the channelMap field. To match the sequenceMap, use the SequenceIterator class instead.
It's main enhancement is to use a channel map match to PamDataUnits, so that it only returns data units that have an overlap in channels with the given channel map (which could be 0xFFFFFFFF).
It also has a couple of extra searches to getPreceeding() and getFollowing() data units.
This class specifically matches the channelMap field. To match the sequenceMap, use the SequenceIterator class instead.
- Author:
 - Doug Gillespie
 
- 
Field Summary
Fields inherited from class PamguardMVC.PamDataUnitIterator
chanOrSeqMap, currentUnitTime, firstUnitTime, lastUnitTime, listIterator, pamDataBlock, synchObject - 
Constructor Summary
ConstructorsConstructorDescriptionChannelIterator(PamDataBlock<E> pamDataBlock, int channelMap, int whereFrom) An iterator that has a bit more functionality than a basic iterator. - 
Method Summary
Modifier and TypeMethodDescriptiongetFirstUnit(int channelMap) Get the first unit for a specific channel or sequence map (any match of channels allowed).getLastUnit(int channelMap) Get the last unit for a specific channel or sequence map (any match of channels allowed).next()Return the next PamDataUnit, or null if there is no 'next' PamDataUnitprevious()Return the previous PamDataUnit, or null if there is no 'previous' PamDataUnitMethods inherited from class PamguardMVC.PamDataUnitIterator
add, getChanOrSeqMap, getClosest, getFollowing, getPamDataBlock, getPreceding, getSynchObject, hasNext, hasPrevious, nextIndex, previousIndex, remove, set, setSynchObjectMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Iterator
forEachRemaining 
- 
Constructor Details
- 
ChannelIterator
An iterator that has a bit more functionality than a basic iterator.
It's main enhancement is to use a channel map match to PamDataUnits, so that it only returns data units that have an overlap in channels with the given channel map (which could be 0xFFFFFFFF).
It also has a couple of extra searches to getPreceeding() and getFollowing() data units.
This class specifically matches the channelMap field. To match the sequenceMap, use the SequenceIterator class instead.- Parameters:
 pamDataBlock- Datablock containing the datachannelMap- channel map (requires overlap, or exact match)whereFrom- start at beginning or end. 0 = beginning; -1 (or PamDatablock.ITERATOR_END) for the end
 
 - 
 - 
Method Details
- 
getFirstUnit
Description copied from class:PamDataUnitIteratorGet the first unit for a specific channel or sequence map (any match of channels allowed).- Specified by:
 getFirstUnitin classPamDataUnitIterator<E extends PamDataUnit>- Parameters:
 channelMap- channel/sequence map- Returns:
 - first data unit with at least one channel matching, or null.
 
 - 
getLastUnit
Description copied from class:PamDataUnitIteratorGet the last unit for a specific channel or sequence map (any match of channels allowed).- Specified by:
 getLastUnitin classPamDataUnitIterator<E extends PamDataUnit>- Parameters:
 channelMap- channel/sequence map- Returns:
 - last data unit with at least one channel matching, or null.
 
 - 
next
Description copied from class:PamDataUnitIteratorReturn the next PamDataUnit, or null if there is no 'next' PamDataUnit- Specified by:
 nextin interfaceIterator<E extends PamDataUnit>- Specified by:
 nextin interfaceListIterator<E extends PamDataUnit>- Specified by:
 nextin classPamDataUnitIterator<E extends PamDataUnit>
 - 
previous
Description copied from class:PamDataUnitIteratorReturn the previous PamDataUnit, or null if there is no 'previous' PamDataUnit- Specified by:
 previousin interfaceListIterator<E extends PamDataUnit>- Specified by:
 previousin classPamDataUnitIterator<E extends PamDataUnit>
 
 -