Class 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$
    Author:
    Thomas Huining Feng
    Pt.AcceptedRating:
    Red (tfeng)
    Pt.ProposedRating:
    Yellow (tfeng)
    • Constructor Summary

      Constructors 
      Constructor Description
      FieldIterator​(java.lang.String values)
      Construct a field iterator.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      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
      • Methods inherited from interface java.util.Iterator

        forEachRemaining
    • Constructor Detail

      • FieldIterator

        public 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>