Package org.biojavax.bio.phylo.io.nexus
Class NexusFile
- java.lang.Object
-
- org.biojavax.bio.phylo.io.nexus.NexusFile
-
-
Constructor Summary
Constructors Constructor Description NexusFile()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addObject(NexusObject object)
Appends an object to the end of the file.Iterator
blockIterator()
Iterate over all blocks in the file in order.Iterator
commentIterator()
Iterate over all comments in the file in order.boolean
containsObject(NexusObject object)
Checks to see if we contain an object.void
insertObject(NexusObject object, int pos)
Inserts an object at the given position.Iterator
objectIterator()
Iterate over all objects in the file in order.void
removeObject(NexusObject object)
Removes an object from the file.
-
-
-
Constructor Detail
-
NexusFile
public NexusFile()
-
-
Method Detail
-
addObject
public void addObject(NexusObject object)
Appends an object to the end of the file.- Parameters:
object
- the NexusObject to append.
-
insertObject
public void insertObject(NexusObject object, int pos)
Inserts an object at the given position.- Parameters:
object
- the NexusObject to insert.pos
- the position (0-indexed) to add it at.
-
removeObject
public void removeObject(NexusObject object)
Removes an object from the file.- Parameters:
object
- the NexusObject to remove.
-
containsObject
public boolean containsObject(NexusObject object)
Checks to see if we contain an object.- Parameters:
object
- the NexusObject to check.- Returns:
- true if we contain it.
-
objectIterator
public Iterator objectIterator()
Iterate over all objects in the file in order.- Returns:
- an iterator of NexusObjects.
-
commentIterator
public Iterator commentIterator()
Iterate over all comments in the file in order.- Returns:
- an iterator of NexusComments.
-
blockIterator
public Iterator blockIterator()
Iterate over all blocks in the file in order.- Returns:
- an iterator of NexusBlocks.
-
-