gov.lanl.HL7
Class SegmentParser

java.lang.Object
  |
  +--gov.lanl.HL7.SegmentParser
All Implemented Interfaces:
java.util.Iterator

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

Pars the HL7Segment into fields returnning them in an iterator

 

Constructor Summary
SegmentParser()
          Create a new SegmentParser
SegmentParser(java.lang.String segment)
          Create a new SegmentParser from a input segment
SegmentParser(java.lang.String segment, java.lang.String separator)
          Create a new SegmentParser from an input Segment and separator
 
Method Summary
 java.util.StringTokenizer getInput()
           
 java.lang.String getNextField()
          Enhance nextToken by replacing repeated delimiters with null strings
 java.lang.String getSeparator()
          return the separator
 boolean hasNext()
          Method declaration
 java.lang.Object next()
          Method declaration
 void remove()
          Method declaration
 void setDebug(boolean debug)
          Method declaration
 void setInput(java.lang.String segment)
          Method declaration
 void setSeparator(java.lang.String separator)
          set the value of the separator
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SegmentParser

public SegmentParser()
Create a new SegmentParser


SegmentParser

public SegmentParser(java.lang.String segment)
Create a new SegmentParser from a input segment


SegmentParser

public SegmentParser(java.lang.String segment,
                     java.lang.String separator)
Create a new SegmentParser from an input Segment and separator

Method Detail

setSeparator

public void setSeparator(java.lang.String separator)
set the value of the separator

Parameters:
separator -

getSeparator

public java.lang.String getSeparator()
return the separator


setDebug

public void setDebug(boolean debug)
Method declaration

Parameters:
debug -
See Also:

setInput

public void setInput(java.lang.String segment)
Method declaration

Parameters:
segment -
See Also:

getInput

public java.util.StringTokenizer getInput()

remove

public void remove()
Method declaration

Specified by:
remove in interface java.util.Iterator
See Also:

hasNext

public boolean hasNext()
Method declaration

Specified by:
hasNext in interface java.util.Iterator
Returns:
See Also:

next

public java.lang.Object next()
Method declaration

Specified by:
next in interface java.util.Iterator
Returns:
See Also:

getNextField

public java.lang.String getNextField()
Enhance nextToken by replacing repeated delimiters with null strings

Returns: