removed diamond operator
[jalview.git] / forester / java / src / org / forester / clade_analysis / ResultSingle.java
1 // $Id:
2 // FORESTER -- software libraries and applications
3 // for evolutionary biology research and applications.
4 //
5 // Copyright (C) 2017 Christian M. Zmasek
6 // Copyright (C) 2017 J. Craig Venter Institute
7 // All rights reserved
8 //
9 // This library is free software; you can redistribute it and/or
10 // modify it under the terms of the GNU Lesser General Public
11 // License as published by the Free Software Foundation; either
12 // version 2.1 of the License, or (at your option) any later version.
13 //
14 // This library is distributed in the hope that it will be useful,
15 // but WITHOUT ANY WARRANTY; without even the implied warranty of
16 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 // Lesser General Public License for more details.
18 //
19 // You should have received a copy of the GNU Lesser General Public
20 // License along with this library; if not, write to the Free Software
21 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
22 //
23 // Contact: phyloxml @ gmail . com
24 // WWW: https://sites.google.com/site/cmzmasek/home/software/forester
25
26 package org.forester.clade_analysis;
27
28 import java.util.ArrayList;
29 import java.util.List;
30
31 import org.forester.util.ForesterUtil;
32
33 public final class ResultSingle {
34
35     private String             _greatest_common_prefix                        = "";
36     private String             _greatest_common_prefix_up                     = "";
37     private String             _greatest_common_prefix_down                   = "";
38     private final List<String> _warnings                                      = new ArrayList<String>();
39     private int                _lec_ext_nodes                                 = 0;
40     private int                _p_ext_nodes                                   = 0;
41     private String             _greatest_common_clade_subtree_confidence      = "";
42     private String             _greatest_common_clade_subtree_confidence_up   = "";
43     private String             _greatest_common_clade_subtree_confidence_down = "";
44
45     public String getGreatestCommonPrefix() {
46         return _greatest_common_prefix;
47     }
48
49     public String getGreatestCommonPrefixUp() {
50         return _greatest_common_prefix_up;
51     }
52
53     public String getGreatestCommonPrefixDown() {
54         return _greatest_common_prefix_down;
55     }
56
57     public String getGreatestCommonCladeSubtreeConfidence() {
58         return _greatest_common_clade_subtree_confidence;
59     }
60
61     public String getGreatestCommonCladeUpSubtreeConfidence() {
62         return _greatest_common_clade_subtree_confidence_up;
63     }
64
65     public String getGreatestCommonCladeDownSubtreeConfidence() {
66         return _greatest_common_clade_subtree_confidence_down;
67     }
68
69     public List<String> getWarnings() {
70         return _warnings;
71     }
72
73     public int getLeastEncompassingCladeSize() {
74         return _lec_ext_nodes;
75     }
76
77     public int getTreeSize() {
78         return _p_ext_nodes;
79     }
80
81     public final String toString() {
82         final StringBuilder sb = new StringBuilder();
83         sb.append( "Greatest common prefix     : " + _greatest_common_prefix );
84         sb.append( ForesterUtil.LINE_SEPARATOR );
85         sb.append( "Greatest common prefix down: " + _greatest_common_prefix_down );
86         sb.append( ForesterUtil.LINE_SEPARATOR );
87         sb.append( "Greatest common prefix up  : " + _greatest_common_prefix_up );
88         return sb.toString();
89     }
90
91     void addWarning( final String warning ) {
92         _warnings.add( warning );
93     }
94
95     void setGreatestCommonPrefix( final String greatest_common_prefix ) {
96         _greatest_common_prefix = greatest_common_prefix;
97     }
98
99     void setGreatestCommonPrefixUp( final String greatest_common_prefix_up ) {
100         _greatest_common_prefix_up = greatest_common_prefix_up;
101     }
102
103     void setGreatestCommonPrefixDown( final String greatest_common_prefix_down ) {
104         _greatest_common_prefix_down = greatest_common_prefix_down;
105     }
106
107     void setGreatestCommonCladeSubtreeConfidence( final String greatest_common_clade_confidence ) {
108         _greatest_common_clade_subtree_confidence = greatest_common_clade_confidence;
109     }
110
111     void setGreatestCommonCladeUpSubtreeConfidence( final String greatest_common_clade_confidence_up ) {
112         _greatest_common_clade_subtree_confidence_up = greatest_common_clade_confidence_up;
113     }
114
115     void setGreatestCommonCladeDownSubtreeConfidence( final String greatest_common_clade_confidence_down ) {
116         _greatest_common_clade_subtree_confidence_down = greatest_common_clade_confidence_down;
117     }
118
119     void setLeastEncompassingCladeSize( final int lec_ext_nodes ) {
120         _lec_ext_nodes = lec_ext_nodes;
121     }
122
123     void setTreeSize( final int p_ext_nodes ) {
124         _p_ext_nodes = p_ext_nodes;
125     }
126 }