|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.paneris.util.CSVStringEnumeration
public class CSVStringEnumeration
A utility for tokenising a string made up of comma-separated variables. Unlike Tim's effort, it handles quoted variables as well. FIXME just don't try and read off the end if the last field is zero-length.
foo, bar om,,"baz, ,oof",xyz -> "foo", " bar om", "", "baz, , oof", "xyz"
Constructor Summary | |
---|---|
CSVStringEnumeration()
|
Method Summary | |
---|---|
boolean |
hasMoreElements()
Are there any more tokens to come? |
java.lang.Object |
nextElement()
Return the next token as an Object. |
java.lang.String |
nextToken()
Return the next token as a String. |
void |
reset(java.lang.String line)
Look at a new string. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CSVStringEnumeration()
Method Detail |
---|
public void reset(java.lang.String line)
public boolean hasMoreElements()
hasMoreElements
in interface java.util.Enumeration
public final java.lang.Object nextElement()
nextElement
in interface java.util.Enumeration
public java.lang.String nextToken()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |