Package org.biojavax.bio.phylo.io.nexus
Class NexusBlockBuilder.Abstract
java.lang.Object
org.biojavax.bio.phylo.io.nexus.NexusBlockBuilder.Abstract
- All Implemented Interfaces:
NexusBlockBuilder,NexusBlockListener
- Direct Known Subclasses:
CharactersBlockBuilder,DistancesBlockBuilder,TaxaBlockBuilder,TreesBlockBuilder
- Enclosing interface:
- NexusBlockBuilder
This abstract version knows how to build and add comments.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.biojavax.bio.phylo.io.nexus.NexusBlockBuilder
NexusBlockBuilder.Abstract -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract voidaddComment(NexusComment comment) Tell the builder to add the given comment at the current location.voidOpening a comment tag.voidcommentText(String comment) Receiving free text inside a comment tag.voidClosing a comment tag.protected StringObtains the name of this block.Obtain the constructed block.voidstartBlock(String blockName) Notifies the parser that a new block is starting.protected abstract NexusBlockTell the builder to start a new block object.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.biojavax.bio.phylo.io.nexus.NexusBlockListener
endBlock, endTokenGroup
-
Constructor Details
-
Abstract
public Abstract()
-
-
Method Details
-
getBlockName
Obtains the name of this block. -
beginComment
Description copied from interface:NexusBlockListenerOpening a comment tag.- Specified by:
beginCommentin interfaceNexusBlockListener
-
commentText
Description copied from interface:NexusBlockListenerReceiving free text inside a comment tag.- Specified by:
commentTextin interfaceNexusBlockListener- Parameters:
comment- the text of the comment.
-
endComment
Description copied from interface:NexusBlockListenerClosing a comment tag.- Specified by:
endCommentin interfaceNexusBlockListener
-
addComment
Tell the builder to add the given comment at the current location.- Parameters:
comment- the comment to add.- Throws:
ParseException- if the comment was invalid.
-
startBlock
Description copied from interface:NexusBlockListenerNotifies the parser that a new block is starting.- Specified by:
startBlockin interfaceNexusBlockListener- Parameters:
blockName- the name of the newly started block.
-
startBlockObject
Tell the builder to start a new block object. -
getNexusBlock
Description copied from interface:NexusBlockBuilderObtain the constructed block.- Specified by:
getNexusBlockin interfaceNexusBlockBuilder- Returns:
- the constructed block.
-