From: gmungoc Date: Mon, 27 Feb 2017 08:58:54 +0000 (+0000) Subject: JAL-2403 JAL-838 remove unused methods and unneeded public visibility X-Git-Tag: Release_2_10_2~3^2~105^2~2^2~83 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=b4228f9114855211ecb84c2670777e00947e8548;p=jalview.git JAL-2403 JAL-838 remove unused methods and unneeded public visibility --- diff --git a/src/jalview/analysis/NJTree.java b/src/jalview/analysis/NJTree.java index fdadb13..4ee0be9 100644 --- a/src/jalview/analysis/NJTree.java +++ b/src/jalview/analysis/NJTree.java @@ -308,8 +308,8 @@ public class NJTree { jalview.io.NewickFile fout = new jalview.io.NewickFile(getTopNode()); - return fout.print(isHasBootstrap(), isHasDistances(), - isHasRootDistance()); // output all data available for tree + return fout.print(hasBootstrap(), hasDistances(), + hasRootDistance()); // output all data available for tree } /** @@ -319,7 +319,7 @@ public class NJTree * @param list * Sequence set to be associated with tree nodes */ - public void UpdatePlaceHolders(List list) + public void updatePlaceHolders(List list) { Vector leaves = findLeaves(top); @@ -404,7 +404,7 @@ public class NJTree /** * DOCUMENT ME! */ - public void cluster() + void cluster() { while (noClus > 2) { @@ -466,7 +466,7 @@ public class NJTree * * @return DOCUMENT ME! */ - public Cluster joinClusters(int i, int j) + Cluster joinClusters(int i, int j) { double dist = distance.getValue(i, j); @@ -534,7 +534,7 @@ public class NJTree * @param dist * DOCUMENT ME! */ - public void findNewNJDistances(SequenceNode tmpi, SequenceNode tmpj, + void findNewNJDistances(SequenceNode tmpi, SequenceNode tmpj, double dist) { @@ -562,7 +562,7 @@ public class NJTree * @param dist * DOCUMENT ME! */ - public void findNewDistances(SequenceNode tmpi, SequenceNode tmpj, + void findNewDistances(SequenceNode tmpi, SequenceNode tmpj, double dist) { double ih = 0; @@ -595,7 +595,7 @@ public class NJTree * @param j * DOCUMENT ME! */ - public void findClusterDistance(int i, int j) + void findClusterDistance(int i, int j) { int noi = cluster.elementAt(i).value.length; int noj = cluster.elementAt(j).value.length; @@ -636,7 +636,7 @@ public class NJTree * @param j * DOCUMENT ME! */ - public void findClusterNJDistance(int i, int j) + void findClusterNJDistance(int i, int j) { // New distances from cluster to others @@ -676,7 +676,7 @@ public class NJTree * * @return DOCUMENT ME! */ - public double findr(int i, int j) + double findr(int i, int j) { double tmp = 1; @@ -702,7 +702,7 @@ public class NJTree * * @return DOCUMENT ME! */ - public double findMinNJDistance() + double findMinNJDistance() { double min = Double.MAX_VALUE; @@ -735,7 +735,7 @@ public class NJTree * * @return DOCUMENT ME! */ - public double findMinDistance() + double findMinDistance() { double min = Double.MAX_VALUE; @@ -764,7 +764,7 @@ public class NJTree /** * DOCUMENT ME! */ - public void makeLeaves() + void makeLeaves() { cluster = new Vector(); @@ -838,54 +838,12 @@ public class NJTree } /** - * Find the leaf node with a particular ycount - * - * @param nd - * initial point on tree to search from - * @param count - * value to search for - * - * @return null or the node with ycound=count - */ - public Object findLeaf(SequenceNode nd, int count) - { - found = _findLeaf(nd, count); - - return found; - } - - /* - * #see findLeaf(SequenceNode node, count) - */ - public Object _findLeaf(SequenceNode nd, int count) - { - if (nd == null) - { - return null; - } - - if (nd.ycount == count) - { - found = nd.element(); - - return found; - } - else - { - _findLeaf((SequenceNode) nd.left(), count); - _findLeaf((SequenceNode) nd.right(), count); - } - - return found; - } - - /** * printNode is mainly for debugging purposes. * * @param nd * SequenceNode */ - public void printNode(SequenceNode nd) + void printNode(SequenceNode nd) { if (nd == null) { @@ -912,7 +870,7 @@ public class NJTree * @param nd * DOCUMENT ME! */ - public void findMaxDist(SequenceNode nd) + void findMaxDist(SequenceNode nd) { if (nd == null) { @@ -1034,8 +992,9 @@ public class NJTree * * @return DOCUMENT ME! */ - public SequenceNode reRoot() + SequenceNode reRoot() { + // TODO not used - remove? if (maxdist != null) { ycount = 0; @@ -1109,7 +1068,7 @@ public class NJTree * @param nd * DOCUMENT ME! */ - public void printN(SequenceNode nd) + void printN(SequenceNode nd) { if (nd == null) { @@ -1152,7 +1111,7 @@ public class NJTree * @param nd * DOCUMENT ME! */ - public void _reCount(SequenceNode nd) + void _reCount(SequenceNode nd) { // if (_lycount<_lylimit) // { @@ -1211,7 +1170,7 @@ public class NJTree * @param dir * DOCUMENT ME! */ - public void changeDirection(SequenceNode nd, SequenceNode dir) + void changeDirection(SequenceNode nd, SequenceNode dir) { if (nd == null) { @@ -1290,7 +1249,7 @@ public class NJTree * * @return true if tree has real distances */ - public boolean isHasDistances() + public boolean hasDistances() { return hasDistances; } @@ -1299,12 +1258,12 @@ public class NJTree * * @return true if tree has real bootstrap values */ - public boolean isHasBootstrap() + public boolean hasBootstrap() { return hasBootstrap; } - public boolean isHasRootDistance() + public boolean hasRootDistance() { return hasRootDistance; } diff --git a/src/jalview/gui/TreePanel.java b/src/jalview/gui/TreePanel.java index 0a33ea8..74dd29a 100755 --- a/src/jalview/gui/TreePanel.java +++ b/src/jalview/gui/TreePanel.java @@ -160,7 +160,7 @@ public class TreePanel extends GTreePanel .println("new alignment sequences vector value is null"); } - tree.UpdatePlaceHolders((List) evt.getNewValue()); + tree.updatePlaceHolders((List) evt.getNewValue()); treeCanvas.nameHash.clear(); // reset the mapping between canvas // rectangles and leafnodes repaint(); @@ -367,8 +367,8 @@ public class TreePanel extends GTreePanel NewickFile fout = new NewickFile(tree.getTopNode()); try { - cap.setText(fout.print(tree.isHasBootstrap(), tree.isHasDistances(), - tree.isHasRootDistance())); + cap.setText(fout.print(tree.hasBootstrap(), tree.hasDistances(), + tree.hasRootDistance())); Desktop.addInternalFrame(cap, newTitle, 500, 100); } catch (OutOfMemoryError oom) { @@ -406,8 +406,8 @@ public class TreePanel extends GTreePanel { jalview.io.NewickFile fout = new jalview.io.NewickFile( tree.getTopNode()); - String output = fout.print(tree.isHasBootstrap(), - tree.isHasDistances(), tree.isHasRootDistance()); + String output = fout.print(tree.hasBootstrap(), + tree.hasDistances(), tree.hasRootDistance()); java.io.PrintWriter out = new java.io.PrintWriter( new java.io.FileWriter(choice)); out.println(output);