fcmodeler.util
Class QuotedStringIterator
java.lang.Object
|
+--fcmodeler.util.QuotedStringIterator
- All Implemented Interfaces:
- java.util.Iterator
- public final class QuotedStringIterator
- extends java.lang.Object
- implements java.util.Iterator
An iterator over the quoted words in a string. This iterator returns the strings surrounded by
double-quotes in the specified string. For example, if the string is
"this" "is" "a" "quoted" "string"
then the strings returned by the next
method are
this
is
a
quoted
string
- Since:
- JDK1.3
- Version:
- $Revision: 1.1 $
- Author:
- Julie Dickerson , Zach Cox
Constructor Summary |
QuotedStringIterator(java.lang.String quotedString)
Creates a new QuotedStringIterator using the specified string. |
Method Summary |
boolean |
hasNext()
Returns true if the iteration has more elements. |
java.lang.Object |
next()
Returns the next element in the iteration. |
void |
remove()
Throws an UnsupportedOperationException since this is an unsupported operation. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
QuotedStringIterator
public QuotedStringIterator(java.lang.String quotedString)
- Creates a new
QuotedStringIterator
using the specified string.
- Parameters:
quotedString
- the string containing the quoted strings to iterate over.
hasNext
public boolean hasNext()
- Returns
true
if the iteration has more elements.
- Specified by:
hasNext
in interface java.util.Iterator
- Returns:
true
if the iteration has more elements.
next
public java.lang.Object next()
- Returns the next element in the iteration.
- Specified by:
next
in interface java.util.Iterator
- Returns:
- the next element in the iteration.
remove
public void remove()
- Throws an
UnsupportedOperationException
since this is an unsupported operation.
- Specified by:
remove
in interface java.util.Iterator