|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.vmdb.hl7.StringList
Description: HL7 Network Connectivity For VMDB.
Copyright: Copyright (c) 2002-2003.
Company: Veterinary Medical Database (VMDB).
More or less take over from the StringTokenizer class but with two modifications. First, two sequential tokens result in an empty string rather than no token. Second getIndex and setIndex allow saving and restoring state to allow roll-back of reading from the list.
Field Summary | |
static char |
NONE
NULL character used to specify no escape character. |
Constructor Summary | |
StringList(java.io.Reader rData,
char cDelimiter)
Construct a string list, splitting the data string with the delimiter character. |
|
StringList(java.lang.String sData,
char cDelimiter)
Construct a string list, splitting the data string with the delimiter character. |
Method Summary | |
int |
getIndex()
Get the current location of the string retrieval pointer as an integer. |
boolean |
hasMoreStrings()
Test list for existence of one or more remaining tokens. |
void |
init(java.io.Reader rData,
char cDelimiter)
Populate this string list, splitting the data string with the delimiter character. |
void |
init(java.lang.String sData,
char cDelimiter)
Populate this string list, splitting the data string with the delimiter character. |
java.lang.String |
nextString()
Get the next string from the list of tokenized strings. |
void |
setIndex(int iCurIndex)
Return the current location pointer to a saved location. |
int |
size()
Return the number of strings in the tokenized list. |
java.lang.String |
toString()
This is mostly a debugging method. |
boolean |
undoNext()
Move the pointer back one, having the effect of putting the last string retrieved back onto the list. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final char NONE
Constructor Detail |
public StringList(java.lang.String sData, char cDelimiter)
sData
- String to be tokenizedcDelimiter
- char Character dividing the data into tokens.public StringList(java.io.Reader rData, char cDelimiter)
rData
- Reader to be tokenizedcDelimiter
- char Character dividing the data into tokens.Method Detail |
public void init(java.lang.String sData, char cDelimiter)
sData
- String to be tokenizedcDelimiter
- char Character dividing the data into tokens.public void init(java.io.Reader rData, char cDelimiter)
cDelimiter
- char Character dividing the data into tokens.public java.lang.String toString()
toString
in class java.lang.Object
public boolean hasMoreStrings()
public java.lang.String nextString()
public boolean undoNext()
public int size()
public int getIndex()
public void setIndex(int iCurIndex)
iCurIndex
- int saved from a call to getIndex()
|
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |