ca.uhn.hl7v2.util
Class ReadOnlyMessageIterator
java.lang.Object
ca.uhn.hl7v2.util.ReadOnlyMessageIterator
- All Implemented Interfaces:
- Iterator<Structure>
public class ReadOnlyMessageIterator
- extends Object
- implements Iterator<Structure>
Iterator though existing Stuctures in a message. No new repetitions or optional
structures are created during iteration (in contrast to MessageIterator).
Note that some structures are created during parsing, so the iteration may include
structures which were not present in the original encoded message. If these are
not desired they can be skipped using a FilterIterator. In fact to obtain an
iterator only over populated segments (not groups or empty segments) use the factory
method in this class.
- Version:
- $Revision: 1.1 $ updated on $Date: 2007-02-19 02:24:27 $ by $Author: jamesagnew $
- Author:
- Bryan Tripp
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ReadOnlyMessageIterator
public ReadOnlyMessageIterator(Group theRoot)
- Parameters:
theRoot - root of depth first iteration, which starts with the first child
createPopulatedSegmentIterator
public static Iterator<Structure> createPopulatedSegmentIterator(Group theRoot)
- Parameters:
theRoot - root of depth first iteration, which starts with the first child
- Returns:
- an iterator that skips groups and empty segments, returning only populated
segments
hasNext
public boolean hasNext()
- Specified by:
hasNext in interface Iterator<Structure>
- See Also:
Iterator.hasNext()
next
public Structure next()
- Specified by:
next in interface Iterator<Structure>
- See Also:
Iterator.next()
remove
public void remove()
- Not supported.
- Specified by:
remove in interface Iterator<Structure>
Copyright © 2001-2012 University Health Network. All Rights Reserved.