Package org.biojavax.bio.phylo.io.nexus
Class DistancesBlockBuilder
java.lang.Object
org.biojavax.bio.phylo.io.nexus.NexusBlockBuilder.Abstract
org.biojavax.bio.phylo.io.nexus.DistancesBlockBuilder
- All Implemented Interfaces:
DistancesBlockListener,NexusBlockBuilder,NexusBlockListener
public class DistancesBlockBuilder
extends NexusBlockBuilder.Abstract
implements DistancesBlockListener
Builds Nexus distances blocks.
- Since:
- 1.6
- Author:
- Richard Holland, Tobias Thierer, Jim Balhoff
-
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 voidaddComment(NexusComment comment) Tell the builder to add the given comment at the current location.voidaddMatrixEntry(String taxa) voidaddTaxLabel(String taxLabel) Add a TAXLABEL.voidappendMatrixData(String taxa, Object data) voidendBlock()Notifies the parser that a block is ending.voidClosing a line (semi-colon encountered).voidsetDiagonal(boolean diagonal) voidsetDimensionsNChar(int dimensionsNChar) Set the NCHAR value.voidsetDimensionsNTax(int dimensionsNTax) Set the NTAX value.voidsetInterleaved(boolean interleaved) voidsetLabels(boolean labels) voidsetMissing(String missing) voidsetTriangle(String triangle) protected NexusBlockTell the builder to start a new block object.Methods inherited from class org.biojavax.bio.phylo.io.nexus.NexusBlockBuilder.Abstract
beginComment, commentText, endComment, getBlockName, getNexusBlock, startBlockMethods 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
beginComment, commentText, endComment, startBlock
-
Constructor Details
-
DistancesBlockBuilder
public DistancesBlockBuilder()
-
-
Method Details
-
addComment
Description copied from class:NexusBlockBuilder.AbstractTell the builder to add the given comment at the current location.- Specified by:
addCommentin classNexusBlockBuilder.Abstract- Parameters:
comment- the comment to add.
-
startBlockObject
Description copied from class:NexusBlockBuilder.AbstractTell the builder to start a new block object.- Specified by:
startBlockObjectin classNexusBlockBuilder.Abstract
-
endBlock
Description copied from interface:NexusBlockListenerNotifies the parser that a block is ending.- Specified by:
endBlockin interfaceNexusBlockListener
-
endTokenGroup
Description copied from interface:NexusBlockListenerClosing a line (semi-colon encountered). This indicates that anything received after it is on the next logical line of the block.- Specified by:
endTokenGroupin interfaceNexusBlockListener
-
addMatrixEntry
- Specified by:
addMatrixEntryin interfaceDistancesBlockListener
-
addTaxLabel
Description copied from interface:DistancesBlockListenerAdd a TAXLABEL. If it already exists, or is a number that refers to an index position that already exists, an exception is thrown.- Specified by:
addTaxLabelin interfaceDistancesBlockListener- Parameters:
taxLabel- the label to add.- Throws:
ParseException- if the label cannot be added.
-
appendMatrixData
- Specified by:
appendMatrixDatain interfaceDistancesBlockListener
-
setDimensionsNChar
Description copied from interface:DistancesBlockListenerSet the NCHAR value.- Specified by:
setDimensionsNCharin interfaceDistancesBlockListener- Parameters:
dimensionsNChar- the NCHAR value.
-
setDimensionsNTax
Description copied from interface:DistancesBlockListenerSet the NTAX value.- Specified by:
setDimensionsNTaxin interfaceDistancesBlockListener- Parameters:
dimensionsNTax- the NTAX value.
-
setInterleaved
- Specified by:
setInterleavedin interfaceDistancesBlockListener
-
setLabels
- Specified by:
setLabelsin interfaceDistancesBlockListener
-
setMissing
- Specified by:
setMissingin interfaceDistancesBlockListener
-
setDiagonal
- Specified by:
setDiagonalin interfaceDistancesBlockListener
-
setTriangle
- Specified by:
setTrianglein interfaceDistancesBlockListener
-