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 void
addComment
(NexusComment comment) Tell the builder to add the given comment at the current location.void
Opening a comment tag.void
commentText
(String comment) Receiving free text inside a comment tag.void
Closing a comment tag.protected String
Obtains the name of this block.Obtain the constructed block.void
startBlock
(String blockName) Notifies the parser that a new block is starting.protected abstract NexusBlock
Tell 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, wait
Methods 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:NexusBlockListener
Opening a comment tag.- Specified by:
beginComment
in interfaceNexusBlockListener
-
commentText
Description copied from interface:NexusBlockListener
Receiving free text inside a comment tag.- Specified by:
commentText
in interfaceNexusBlockListener
- Parameters:
comment
- the text of the comment.
-
endComment
Description copied from interface:NexusBlockListener
Closing a comment tag.- Specified by:
endComment
in interfaceNexusBlockListener
-
addComment
Tell the builder to add the given comment at the current location.- Parameters:
comment
- the comment to add.
-
startBlock
Description copied from interface:NexusBlockListener
Notifies the parser that a new block is starting.- Specified by:
startBlock
in 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:NexusBlockBuilder
Obtain the constructed block.- Specified by:
getNexusBlock
in interfaceNexusBlockBuilder
- Returns:
- the constructed block.
-