2 * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
3 * Copyright (C) $$Year-Rel$$ The Jalview Authors
5 * This file is part of Jalview.
7 * Jalview is free software: you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation, either version 3
10 * of the License, or (at your option) any later version.
12 * Jalview is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty
14 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15 * PURPOSE. See the GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with Jalview. If not, see <http://www.gnu.org/licenses/>.
19 * The Jalview Authors are detailed in the 'AUTHORS' file.
21 package jalview.datamodel;
29 public class SequenceNode extends BinaryNode
31 private boolean placeholder = false;
34 * Creates a new SequenceNode object.
42 * Creates a new SequenceNode object.
53 public SequenceNode(Object val, BinaryNode parent, double dist,
56 super(val, parent, name);
61 * Creates a new SequenceNode object.
76 public SequenceNode(Object val, BinaryNode parent, String name,
77 double dist, int bootstrap, boolean dummy)
79 super(val, parent, name);
81 this.bootstrap = bootstrap;
87 * true if node is created for the representation of polytomous trees
89 public boolean isDummy()
95 * @param placeholder is true if the sequence refered to in the element node
96 * is not actually present in the associated alignment
98 public boolean isPlaceholder()
109 * @return DOCUMENT ME!
111 public boolean setDummy(boolean newstate)
113 boolean oldstate = dummy;
125 public void setPlaceholder(boolean Placeholder)
127 this.placeholder = Placeholder;
131 * test if this node has a name that might be a label rather than a bootstrap
134 * @return true if node has a non-numeric label
136 public boolean isSequenceLabel()
138 if (name != null && name.length() > 0)
140 for (int c = 0, s = name.length(); c < s; c++)
142 char q = name.charAt(c);
143 if ('0' <= q && q <= '9')