- private PhylogenyNode( final String nhx,
- final NHXParser.TAXONOMY_EXTRACTION taxonomy_extraction,
- final boolean replace_underscores ) throws NHXFormatException, PhyloXmlDataFormatException {
- NHXParser.parseNHX( nhx, this, taxonomy_extraction, replace_underscores );
- setId( PhylogenyNode.getNodeCount() );
- PhylogenyNode.increaseNodeCount();
- setSumExtNodes( 1 ); // For ext node, this number is 1 (not 0!!).
+ /**
+ * Returns the total number of all Nodes created so far.
+ *
+ * @return total number of Nodes (long)
+ */
+ synchronized final public static long getNodeCount() {
+ return NODE_COUNT;
+ }
+
+ /**
+ * Decreases the total number of all Nodes created so far by one.
+ */
+ final static synchronized void decreaseNodeCount() {
+ --NODE_COUNT;
+ }
+
+ /**
+ * Sets the total number of all Nodes created so far to i.
+ */
+ synchronized final static void setNodeCount( final long i ) {
+ PhylogenyNode.NODE_COUNT = i;
+ }
+
+ /**
+ * Increases the total number of all Nodes created so far by one.
+ */
+ synchronized final private static void increaseNodeCount() {
+ ++NODE_COUNT;
+ }
+
+ public enum NH_CONVERSION_SUPPORT_VALUE_STYLE {
+ AS_INTERNAL_NODE_NAMES, IN_SQUARE_BRACKETS, NONE;