public class DistancesBlock extends NexusBlock.Abstract
NexusBlock.Abstract
Modifier and Type | Field and Description |
---|---|
static String |
DISTANCES_BLOCK
A constant representing the name of Distances blocks.
|
Constructor and Description |
---|
DistancesBlock()
Delegates to NexusBlock.Abstract constructor using
DistancesBlock.DISTANCES_BLOCK as the name.
|
Modifier and Type | Method and Description |
---|---|
void |
addComment(NexusComment comment)
Adds a comment.
|
void |
addMatrixEntry(String taxa) |
void |
addTaxLabel(String taxLabel)
Add a TAXLABEL.
|
void |
appendMatrixData(String taxa,
Object data) |
boolean |
containsTaxLabel(String taxLabel)
Checks to see if we contain the given TAXLABEL.
|
List |
getComments()
Returns all comments.
|
int |
getDimensionsNChar()
Get the NCHAR value.
|
int |
getDimensionsNTax()
Get the NTAX value.
|
List |
getMatrixData(String taxa) |
Collection |
getMatrixLabels() |
String |
getMissing() |
List |
getTaxLabels()
Get the TAXLABEL values added so far.
|
boolean |
isDiagonal() |
boolean |
isInterleaved() |
boolean |
isLabels() |
void |
removeComment(NexusComment comment)
Removes a comment.
|
void |
removeTaxLabel(String taxLabel)
Removes the given TAXLABEL.
|
void |
setDiagonal(boolean diagonal) |
void |
setDimensionsNChar(int dimensionsNChar)
Set the NCHAR value.
|
void |
setDimensionsNTax(int dimensionsNTax)
Set the NTAX value.
|
void |
setInterleaved(boolean interleaved) |
void |
setLabels(boolean labels) |
void |
setMissing(String missing) |
void |
setTriangle(String triangle) |
protected void |
writeBlockContents(Writer writer)
Implement this to write out block contents, not including the BEGIN
and END tags.
|
getBlockName, writeObject, writeToken
public static final String DISTANCES_BLOCK
public DistancesBlock()
public void setDimensionsNTax(int dimensionsNTax)
dimensionsNTax
- the NTAX value.public int getDimensionsNTax()
public void setDimensionsNChar(int dimensionsNChar)
dimensionsNChar
- the NCHAR value.public int getDimensionsNChar()
public void setTriangle(String triangle)
public void setDiagonal(boolean diagonal)
public boolean isDiagonal()
public void setLabels(boolean labels)
public boolean isLabels()
public void setMissing(String missing)
public String getMissing()
public void setInterleaved(boolean interleaved)
public boolean isInterleaved()
public void addTaxLabel(String taxLabel) throws ParseException
taxLabel
- the label to add.ParseException
- if the label cannot be added.public void removeTaxLabel(String taxLabel)
taxLabel
- the label to remove.public boolean containsTaxLabel(String taxLabel)
taxLabel
- the label to check for.public List getTaxLabels()
public void addMatrixEntry(String taxa)
public void appendMatrixData(String taxa, Object data)
public List getMatrixData(String taxa)
public Collection getMatrixLabels()
public void addComment(NexusComment comment)
comment
- the comment to add.public void removeComment(NexusComment comment)
comment
- the comment to remove.public List getComments()
protected void writeBlockContents(Writer writer) throws IOException
NexusBlock.Abstract
writeBlockContents
in class NexusBlock.Abstract
writer
- the writer to write to.IOException
- if writing failed.Copyright © 2014 BioJava. All rights reserved.