Package org.biojava.nbio.structure
Class AtomIterator
java.lang.Object
org.biojava.nbio.structure.AtomIterator
an iterator over all atoms of a structure / group.
- Since:
- 1.4
- Version:
- %I% %G%
- Author:
- Andreas Prlic
-
Constructor Summary
ConstructorDescriptionConstructs an AtomIterator object.AtomIterator
(Structure struct) Constructs an AtomIterator object. -
Method Summary
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 Details
-
AtomIterator
Constructs an AtomIterator object.- Parameters:
struct
- a Structure object
-
AtomIterator
Constructs an AtomIterator object.- Parameters:
g
- a Group object
-
-
Method Details
-
getCurrentChain
Get the chain that contains the current atom.- Returns:
- a Chain object
-
getCurrentModel
public int getCurrentModel()Get the model number of the model containing the current atom.- Returns:
- the number of the model
-
hasNext
public boolean hasNext()Is there a next atom ? -
next
Return next atom.- Specified by:
next
in interfaceIterator<Atom>
- Returns:
- the next Atom
- Throws:
NoSuchElementException
- if there is no atom after the current one
-
remove
public void remove()does nothing.
-