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
ConstructorsConstructorDescriptionConstructs an AtomIterator object.AtomIterator(Structure struct) Constructs an AtomIterator object over all modelsAtomIterator(Structure struct, int modelNr) Constructs an AtomIterator object over a single model -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Iterator
forEachRemaining
-
Constructor Details
-
AtomIterator
Constructs an AtomIterator object over all models- Parameters:
struct- a Structure object
-
AtomIterator
Constructs an AtomIterator object over a single model- 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
Get the model number of the model containing the current atom.- Returns:
- the number of the model
-
hasNext
Is there a next atom ? -
next
Return next atom.- Specified by:
nextin interfaceIterator<Atom>- Returns:
- the next Atom
- Throws:
NoSuchElementException- if there is no atom after the current one
-
remove
does nothing.
-