Package org.biojavax.bio.phylo.io.nexus
Class NexusBlock.Abstract
java.lang.Object
org.biojavax.bio.phylo.io.nexus.NexusBlock.Abstract
- All Implemented Interfaces:
NexusBlock,NexusObject
- Direct Known Subclasses:
CharactersBlock,DistancesBlock,TaxaBlock,TreesBlock
- Enclosing interface:
- NexusBlock
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.biojavax.bio.phylo.io.nexus.NexusBlock
NexusBlock.Abstract -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the block name.protected abstract voidwriteBlockContents(Writer writer) Implement this to write out block contents, not including the BEGIN and END tags.voidwriteObject(Writer writer) Writes this object to the given writer.protected voidwriteToken(Writer writer, String token) Writes a token and correctly substitutes all symbols in it.
-
Constructor Details
-
Abstract
Construct a block with a given name.- Parameters:
blockName- the name to give the block.
-
-
Method Details
-
getBlockName
Description copied from interface:NexusBlockGet the block name.- Specified by:
getBlockNamein interfaceNexusBlock- Returns:
- the block name.
-
writeObject
Description copied from interface:NexusObjectWrites this object to the given writer.- Specified by:
writeObjectin interfaceNexusObject- Parameters:
writer- the writer to write to.- Throws:
IOException- if it could not be written.
-
writeToken
Writes a token and correctly substitutes all symbols in it.- Parameters:
writer- the writer to write to.token- the token to write.- Throws:
IOException- if writing failed.
-
writeBlockContents
Implement this to write out block contents, not including the BEGIN and END tags.- Parameters:
writer- the writer to write to.- Throws:
IOException- if writing failed.
-