2 // FORESTER -- software libraries and applications
3 // for evolutionary biology research and applications.
5 // Copyright (C) 2017 Christian M. Zmasek
6 // Copyright (C) 2017 J. Craig Venter Institute
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.
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.
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
23 // Contact: phyloxml @ gmail . com
24 // WWW: https://sites.google.com/site/cmzmasek/home/software/forester
26 package org.forester.clade_analysis;
28 import java.util.ArrayList;
29 import java.util.List;
31 public final class Result {
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;
40 void addWarning( final String warning ) {
41 _warnings.add( warning );
44 void setGreatestCommonPrefix( final String greatest_common_prefix ) {
45 _greatest_common_prefix = greatest_common_prefix;
48 void setGreatestCommonPrefixUp( final String greatest_common_prefix_up ) {
49 _greatest_common_prefix_up = greatest_common_prefix_up;
52 void setGreatestCommonPrefixDown( final String greatest_common_prefix_down ) {
53 _greatest_common_prefix_down = greatest_common_prefix_down;
56 public String getGreatestCommonPrefix() {
57 return _greatest_common_prefix;
60 public String getGreatestCommonPrefixUp() {
61 return _greatest_common_prefix_up;
64 public String getGreatestCommonPrefixDown() {
65 return _greatest_common_prefix_down;
68 public List<String> getWarnings() {
72 void setLeastEncompassingCladeSize( final int lec_ext_nodes ) {
73 _lec_ext_nodes = lec_ext_nodes;
76 void setTreeSize( final int p_ext_nodes ) {
77 _p_ext_nodes = p_ext_nodes;
80 public int getLeastEncompassingCladeSize() {
81 return _lec_ext_nodes;
84 public int getTreeSize() {