Class GroupIterator

  • All Implemented Interfaces:
    Iterator<Group>

    public class GroupIterator
    extends Object
    implements Iterator<Group>
    An iterator over all groups of a structure.
    Since:
    1.4
    Version:
    %I% %G%
    Author:
    Andreas Prlic
    • Constructor Detail

      • GroupIterator

        public GroupIterator​(Structure struct)
        Constructs a GroupIterator object over all models
        Parameters:
        struct - a Structure object
      • GroupIterator

        public GroupIterator​(Structure struct,
                             int modelNr)
        Constructs a GroupIterator object over a specific model
        Parameters:
        struct - a Structure object
    • Method Detail

      • clone

        public Object clone()
        Creates and returns a copy of this object.
        Overrides:
        clone in class Object
      • hasNext

        public boolean hasNext()
        is there a group after the current one in the structure?
        Specified by:
        hasNext in interface Iterator<Group>
      • getCurrentModel

        public int getCurrentModel()
        Get the model number of the current model.
        Returns:
        the number of the model
      • getCurrentChain

        public Chain getCurrentChain()
        Get the current Chain. Returns null if we are at the end of the iteration.
        Returns:
        the Chain of the current position
      • remove

        public void remove()
        does nothing .
        Specified by:
        remove in interface Iterator<Group>