Package org.biojava.nbio.structure
Class AtomIterator
- java.lang.Object
-
- org.biojava.nbio.structure.AtomIterator
-
-
Constructor Summary
Constructors Constructor Description AtomIterator(Group g)
Constructs 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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Chain
getCurrentChain()
Get the chain that contains the current atom.int
getCurrentModel()
Get the model number of the model containing the current atom.boolean
hasNext()
Is there a next atom ?Atom
next()
Return next atom.void
remove()
does nothing.-
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
-
AtomIterator
public AtomIterator(Structure struct)
Constructs an AtomIterator object over all models- Parameters:
struct
- a Structure object
-
AtomIterator
public AtomIterator(Structure struct, int modelNr)
Constructs an AtomIterator object over a single model- Parameters:
struct
- a Structure object
-
AtomIterator
public AtomIterator(Group g)
Constructs an AtomIterator object.- Parameters:
g
- a Group object
-
-
Method Detail
-
getCurrentChain
public Chain 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
public Atom next() throws NoSuchElementException
Return next atom.- Specified by:
next
in interfaceIterator<Atom>
- Returns:
- the next Atom
- Throws:
NoSuchElementException
- if there is no atom after the current one
-
-