first prototype
[jalview.git] / forester / java / src / org / forester / clade_analysis / Result.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 public final class Result {
32
33     private String             _greatest_common_prefix      = "";
34     private String             _greatest_common_prefix_up   = "";
35     private String             _greatest_common_prefix_down = "";
36     private final List<String> _warnings                    = new ArrayList<>();
37     private int                _lec_ext_nodes               = 0;
38     private int                _p_ext_nodes                 = 0;
39
40     void addWarning( final String warning ) {
41         _warnings.add( warning );
42     }
43
44     void setGreatestCommonPrefix( final String greatest_common_prefix ) {
45         _greatest_common_prefix = greatest_common_prefix;
46     }
47
48     void setGreatestCommonPrefixUp( final String greatest_common_prefix_up ) {
49         _greatest_common_prefix_up = greatest_common_prefix_up;
50     }
51
52     void setGreatestCommonPrefixDown( final String greatest_common_prefix_down ) {
53         _greatest_common_prefix_down = greatest_common_prefix_down;
54     }
55
56     public String getGreatestCommonPrefix() {
57         return _greatest_common_prefix;
58     }
59
60     public String getGreatestCommonPrefixUp() {
61         return _greatest_common_prefix_up;
62     }
63
64     public String getGreatestCommonPrefixDown() {
65         return _greatest_common_prefix_down;
66     }
67
68     public List<String> getWarnings() {
69         return _warnings;
70     }
71
72     void setLeastEncompassingCladeSize( final int lec_ext_nodes ) {
73         _lec_ext_nodes = lec_ext_nodes;
74     }
75
76     void setTreeSize( final int p_ext_nodes ) {
77         _p_ext_nodes = p_ext_nodes;
78     }
79
80     public int getLeastEncompassingCladeSize() {
81         return _lec_ext_nodes;
82     }
83
84     public int getTreeSize() {
85         return _p_ext_nodes;
86     }
87 }