Package org.forester.phylogeny.data
Class BinaryCharacters
java.lang.Object
org.forester.phylogeny.data.BinaryCharacters
- All Implemented Interfaces:
PhylogenyData
-
Field Summary
-
Constructor Summary
ConstructorDescriptionBinaryCharacters
(SortedSet<String> present_characters, SortedSet<String> gained_characters, SortedSet<String> lost_characters, String type) BinaryCharacters
(SortedSet<String> present_characters, SortedSet<String> gained_characters, SortedSet<String> lost_characters, String type, int present_count, int gained_count, int lost_count) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addGainedCharacter
(String binary_character) void
addLostCharacter
(String binary_character) void
addPresentCharacter
(String binary_character) asText()
copy()
Creates a new PhylogenyData object with identical values as this PhylogenyData.String[]
int
String[]
int
String[]
int
getType()
boolean
isEqual
(PhylogenyData data) Compares this PhylogenyData to PhylogenyData data.void
toNHX()
void
toPhyloXML
(Writer writer, int level, String indentation) Writes a phyloXML representation of this phylogeny data.toString()
-
Field Details
-
COUNT_DEFAULT
public static final int COUNT_DEFAULT- See Also:
-
-
Constructor Details
-
BinaryCharacters
public BinaryCharacters() -
BinaryCharacters
-
BinaryCharacters
-
-
Method Details
-
addGainedCharacter
-
addLostCharacter
-
addPresentCharacter
-
asSimpleText
- Specified by:
asSimpleText
in interfacePhylogenyData
-
asText
- Specified by:
asText
in interfacePhylogenyData
-
copy
Description copied from interface:PhylogenyData
Creates a new PhylogenyData object with identical values as this PhylogenyData. This ~should~ return a deep copy, but not there yet.- Specified by:
copy
in interfacePhylogenyData
- Returns:
- a ~deep~ copy of this PhylogenyData
-
getGainedCharacters
-
getGainedCharactersAsStringArray
-
getGainedCharactersAsStringBuffer
-
getGainedCount
public int getGainedCount() -
getLostCharacters
-
getLostCharactersAsStringArray
-
getLostCharactersAsStringBuffer
-
getLostCount
public int getLostCount() -
getPresentCharacters
-
getPresentCharactersAsStringArray
-
getPresentCharactersAsStringBuffer
-
getPresentCount
public int getPresentCount() -
getType
-
isEqual
Description copied from interface:PhylogenyData
Compares this PhylogenyData to PhylogenyData data. In general, this should return true if and only if all fiels are exactly identical.- Specified by:
isEqual
in interfacePhylogenyData
- Returns:
- in general, true if and only if all fiels are exactly identical, false otherwise
-
setType
-
toNHX
- Specified by:
toNHX
in interfacePhylogenyData
-
toPhyloXML
Description copied from interface:PhylogenyData
Writes a phyloXML representation of this phylogeny data.- Specified by:
toPhyloXML
in interfacePhylogenyData
- Throws:
IOException
-
toString
-