ca.uhn.hl7v2.util
Class ReadOnlyMessageIterator
java.lang.Object
ca.uhn.hl7v2.util.ReadOnlyMessageIterator
- All Implemented Interfaces:
- java.util.Iterator
public class ReadOnlyMessageIterator
- extends java.lang.Object
- implements java.util.Iterator
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 java.util.Iterator 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 java.util.Iterator
- See Also:
Iterator.hasNext()
next
public java.lang.Object next()
- Specified by:
next
in interface java.util.Iterator
- See Also:
Iterator.next()
remove
public void remove()
- Not supported.
- Specified by:
remove
in interface java.util.Iterator
Copyright © 2001-2011 University Health Network. All Rights Reserved.