ptolemy.actor.gt
Class GTIngredient.FieldIterator

java.lang.Object
  extended by ptolemy.actor.gt.GTIngredient.FieldIterator
All Implemented Interfaces:
java.util.Iterator<java.lang.String>
Enclosing class:
GTIngredient

protected static class GTIngredient.FieldIterator
extends java.lang.Object
implements java.util.Iterator<java.lang.String>

An iterator to read the fields one by one in a string that describes the values of all the elements.

Since:
Ptolemy II 7.1
Version:
$Id: GTIngredient.java 57040 2010-01-27 20:52:32Z cxh $
Author:
Thomas Huining Feng
Accepted Rating:
Red (tfeng)
Proposed Rating:
Yellow (tfeng)

Field Summary
private  java.lang.String _values
          The string containing the fields.
 
Constructor Summary
GTIngredient.FieldIterator(java.lang.String values)
          Construct a field iterator.
 
Method Summary
 boolean hasNext()
          Return whether there is a next field.
 java.lang.String next()
          Return the next field, if there is any, or null if the end of the string has been reached.
 void remove()
          Throw a runtime exception because this method is not implemented.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_values

private java.lang.String _values
The string containing the fields.

Constructor Detail

GTIngredient.FieldIterator

public GTIngredient.FieldIterator(java.lang.String values)
Construct a field iterator.

Parameters:
values - The string containing the values in fields.
Method Detail

hasNext

public boolean hasNext()
Return whether there is a next field.

Specified by:
hasNext in interface java.util.Iterator<java.lang.String>
Returns:
true if there is a next field; false otherwise.

next

public java.lang.String next()
Return the next field, if there is any, or null if the end of the string has been reached.

Specified by:
next in interface java.util.Iterator<java.lang.String>
Returns:
The next field of the string.

remove

public void remove()
Throw a runtime exception because this method is not implemented.

Specified by:
remove in interface java.util.Iterator<java.lang.String>