Package org.biojavax.bio.phylo.io.nexus
Class NexusComment
- java.lang.Object
-
- org.biojavax.bio.phylo.io.nexus.NexusComment
-
- All Implemented Interfaces:
NexusObject
public class NexusComment extends java.lang.Object implements NexusObject
Represents a Nexus comment, possibly nested.- Since:
- 1.6
- Author:
- Richard Holland, Tobias Thierer, Jim Balhoff
-
-
Constructor Summary
Constructors Constructor Description NexusComment()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddCommentText(java.lang.String text)voidcloseSubComment()java.util.IteratorcommentIterator()This iterator iterates over all parts of the comment.booleanhasOpenSubComment()voidopenSubComment()voidwriteObject(java.io.Writer writer)Writes this object to the given writer.
-
-
-
Constructor Detail
-
NexusComment
public NexusComment()
-
-
Method Detail
-
openSubComment
public void openSubComment()
-
hasOpenSubComment
public boolean hasOpenSubComment()
-
closeSubComment
public void closeSubComment()
-
addCommentText
public void addCommentText(java.lang.String text)
-
commentIterator
public java.util.Iterator commentIterator()
This iterator iterates over all parts of the comment. Each item returned is either a String or a NexusComment.- Returns:
- an iterator over the comment components.
-
writeObject
public void writeObject(java.io.Writer writer) throws java.io.IOException
Description copied from interface:NexusObjectWrites this object to the given writer.- Specified by:
writeObjectin interfaceNexusObject- Parameters:
writer- the writer to write to.- Throws:
java.io.IOException- if it could not be written.
-
-