From 44268696695fe4454ddbd06791c4067f219b75fe Mon Sep 17 00:00:00 2001 From: cmzmasek Date: Wed, 25 Oct 2017 15:22:00 -0700 Subject: [PATCH] removed diamond operator --- .../src/org/forester/application/cladinator.java | 2 +- .../src/org/forester/application/fasta_split.java | 2 +- .../org/forester/application/pplacer_summary.java | 2 +- .../java/src/org/forester/application/rid.java | 4 +- .../org/forester/clade_analysis/AnalysisMulti.java | 4 +- .../forester/clade_analysis/AnalysisSingle.java | 4 +- .../org/forester/clade_analysis/ResultMulti.java | 40 +-- .../org/forester/clade_analysis/ResultSingle.java | 2 +- .../java/src/org/forester/phylogeny/Phylogeny.java | 26 +- forester/java/src/org/forester/rio/RIOUtil.java | 13 +- forester/java/src/org/forester/test/Test.java | 279 ++++++++------------ .../java/src/org/forester/util/ForesterUtil.java | 14 +- 12 files changed, 168 insertions(+), 224 deletions(-) diff --git a/forester/java/src/org/forester/application/cladinator.java b/forester/java/src/org/forester/application/cladinator.java index a4b273f..6b66230 100644 --- a/forester/java/src/org/forester/application/cladinator.java +++ b/forester/java/src/org/forester/application/cladinator.java @@ -101,7 +101,7 @@ public final class cladinator { print_help(); System.exit( -1 ); } - final List allowed_options = new ArrayList<>(); + final List allowed_options = new ArrayList(); allowed_options.add( SEP_OPTION ); allowed_options.add( QUERY_PATTERN_OPTION ); allowed_options.add( SPECIFICS_CUTOFF_OPTION ); diff --git a/forester/java/src/org/forester/application/fasta_split.java b/forester/java/src/org/forester/application/fasta_split.java index 94a53a6..5dc963c 100644 --- a/forester/java/src/org/forester/application/fasta_split.java +++ b/forester/java/src/org/forester/application/fasta_split.java @@ -94,7 +94,7 @@ public final class fasta_split { ForesterUtil.fatalError( PRG_NAME, infile + " appears empty" ); } System.out.println( "Read " + seqs.size() + " sequences" ); - final Map> output = new HashMap<>(); + final Map> output = new HashMap>(); for( final MolecularSequence seq : seqs ) { final Matcher m = pa.matcher( seq.getIdentifier() ); if ( m.find() ) { diff --git a/forester/java/src/org/forester/application/pplacer_summary.java b/forester/java/src/org/forester/application/pplacer_summary.java index 91a488a..d914af8 100644 --- a/forester/java/src/org/forester/application/pplacer_summary.java +++ b/forester/java/src/org/forester/application/pplacer_summary.java @@ -19,7 +19,7 @@ public class pplacer_summary { public static void main( final String args[] ) { final File indir = new File( "." ); final File[] list_of_files = indir.listFiles(); - final List infiles = new ArrayList<>(); + final List infiles = new ArrayList(); for( final File file : list_of_files ) { if ( file.isFile() && file.canRead() && file.toString().endsWith( ".sing.tre" ) ) { infiles.add( file ); diff --git a/forester/java/src/org/forester/application/rid.java b/forester/java/src/org/forester/application/rid.java index 9d25d8d..2b28777 100644 --- a/forester/java/src/org/forester/application/rid.java +++ b/forester/java/src/org/forester/application/rid.java @@ -108,7 +108,7 @@ public class rid { print_help(); System.exit( -1 ); } - final List allowed_options = new ArrayList<>(); + final List allowed_options = new ArrayList(); allowed_options.add( OUTPUT_FORMAT_OPTION ); allowed_options.add( ID_NORM_OPTION ); final String dissallowed_options = cla.validateAllowedOptionsAsString( allowed_options ); @@ -265,7 +265,7 @@ public class rid { else { System.out.println( "Alignment length : " + ( int ) stats.getMax() ); } - final List output_seqs = new ArrayList<>(); + final List output_seqs = new ArrayList(); int counter = 0; final BufferedWriter output_map_writer; if ( normalize_identifiers ) { diff --git a/forester/java/src/org/forester/clade_analysis/AnalysisMulti.java b/forester/java/src/org/forester/clade_analysis/AnalysisMulti.java index 44f46cd..3970e5d 100644 --- a/forester/java/src/org/forester/clade_analysis/AnalysisMulti.java +++ b/forester/java/src/org/forester/clade_analysis/AnalysisMulti.java @@ -97,7 +97,7 @@ public final class AnalysisMulti { while ( qnode_pp.getNumberOfDescendants() == 1 ) { qnode_pp = qnode_pp.getParent(); } - final List qnode_ext_nodes_names = new ArrayList<>(); + final List qnode_ext_nodes_names = new ArrayList(); for( final PhylogenyNode qnode_ext_node : qnode_pp.getAllExternalDescendants() ) { final String name = qnode_ext_node.getName(); final Matcher m = query.matcher( name ); @@ -202,7 +202,7 @@ public final class AnalysisMulti { final String separator, final Pattern query ) { final int child_index = child.getChildNodeIndex(); - final List ext_nodes_names = new ArrayList<>(); + final List ext_nodes_names = new ArrayList(); final List descs = parent.getDescendants(); for( int i = 0; i < descs.size(); ++i ) { if ( i != child_index ) { diff --git a/forester/java/src/org/forester/clade_analysis/AnalysisSingle.java b/forester/java/src/org/forester/clade_analysis/AnalysisSingle.java index 14863d4..64f9d59 100644 --- a/forester/java/src/org/forester/clade_analysis/AnalysisSingle.java +++ b/forester/java/src/org/forester/clade_analysis/AnalysisSingle.java @@ -62,7 +62,7 @@ public final class AnalysisSingle { final List qnode_ext_nodes = qnode_pp.getAllExternalDescendants(); final int lec_ext_nodes = qnode_ext_nodes.size() - 1; final int p_ext_nodes = p.getNumberOfExternalNodes() - 1; - final List qnode_ext_nodes_names = new ArrayList<>(); + final List qnode_ext_nodes_names = new ArrayList(); for( final PhylogenyNode qnode_ext_node : qnode_ext_nodes ) { String name = qnode_ext_node.getName(); if ( ForesterUtil.isEmptyTrimmed( name ) ) { @@ -108,7 +108,7 @@ public final class AnalysisSingle { final PhylogenyNode parent, final String separator ) { final int child_index = child.getChildNodeIndex(); - final List ext_nodes_names = new ArrayList<>(); + final List ext_nodes_names = new ArrayList(); final List descs = parent.getDescendants(); String conf = null; for( int i = 0; i < descs.size(); ++i ) { diff --git a/forester/java/src/org/forester/clade_analysis/ResultMulti.java b/forester/java/src/org/forester/clade_analysis/ResultMulti.java index 285e533..3f55364 100644 --- a/forester/java/src/org/forester/clade_analysis/ResultMulti.java +++ b/forester/java/src/org/forester/clade_analysis/ResultMulti.java @@ -42,9 +42,9 @@ public final class ResultMulti { private final static double MIN_DIFF = 1E-5; private final String _separator; - private final List _greatest_common_prefixes = new ArrayList<>(); - private final List _greatest_common_prefixes_up = new ArrayList<>(); - private final List _greatest_common_prefixes_down = new ArrayList<>(); + private final List _greatest_common_prefixes = new ArrayList(); + private final List _greatest_common_prefixes_up = new ArrayList(); + private final List _greatest_common_prefixes_down = new ArrayList(); private List _all = null; private List _collapsed = null; private List _cleaned_spec = null; @@ -233,17 +233,17 @@ public final class ResultMulti { } private final void reset() { - _all = new ArrayList<>(); - _collapsed = new ArrayList<>(); - _cleaned_spec = new ArrayList<>(); + _all = new ArrayList(); + _collapsed = new ArrayList(); + _cleaned_spec = new ArrayList(); _has_specifics = false; - _all_up = new ArrayList<>(); - _collapsed_up = new ArrayList<>(); - _cleaned_spec_up = new ArrayList<>(); + _all_up = new ArrayList(); + _collapsed_up = new ArrayList(); + _cleaned_spec_up = new ArrayList(); _has_specifics_up = false; - _all_down = new ArrayList<>(); - _collapsed_down = new ArrayList<>(); - _cleaned_spec_down = new ArrayList<>(); + _all_down = new ArrayList(); + _collapsed_down = new ArrayList(); + _cleaned_spec_down = new ArrayList(); _has_specifics_down = false; } @@ -308,12 +308,12 @@ public final class ResultMulti { final List cleaned, final List collapsed, final String separator ) { - final List cleaned_spec = new ArrayList<>(); - final Set collapsed_set = new HashSet<>(); + final List cleaned_spec = new ArrayList(); + final Set collapsed_set = new HashSet(); for( final Prefix prefix : collapsed ) { collapsed_set.add( prefix.getPrefix() ); } - final List spec = new ArrayList<>(); + final List spec = new ArrayList(); for( final Prefix prefix : cleaned ) { if ( ( prefix.getConfidence() >= cutoff ) && !collapsed_set.contains( prefix.getPrefix() ) ) { spec.add( prefix ); @@ -340,8 +340,8 @@ public final class ResultMulti { } private final static List collapse( final List cleaned ) throws UserException { - final List collapsed = new ArrayList<>(); - final Set firsts = new HashSet<>(); + final List collapsed = new ArrayList(); + final Set firsts = new HashSet(); double confidence_sum = 0; for( final Prefix prefix : cleaned ) { final String f = prefix.getPrefixFirstElement(); @@ -368,7 +368,7 @@ public final class ResultMulti { * */ private final static List removeLessSpecificPrefixes( final List l, final String separator ) { - final List cleaned = new ArrayList<>(); + final List cleaned = new ArrayList(); for( final Prefix o : l ) { boolean ok = true; for( final Prefix i : l ) { @@ -409,7 +409,7 @@ public final class ResultMulti { private final static List obtainAllPrefixes( final List greatest_common_prefixes, final String separator ) { - final SortedMap map = new TreeMap<>(); + final SortedMap map = new TreeMap(); for( final Prefix prefix : greatest_common_prefixes ) { final List prefixes = ForesterUtil.spliIntoPrefixes( prefix.getPrefix(), separator ); for( final String p : prefixes ) { @@ -423,7 +423,7 @@ public final class ResultMulti { } } } - final List l = new ArrayList<>(); + final List l = new ArrayList(); for( final Entry entry : map.entrySet() ) { l.add( new Prefix( entry.getKey(), entry.getValue(), separator ) ); } diff --git a/forester/java/src/org/forester/clade_analysis/ResultSingle.java b/forester/java/src/org/forester/clade_analysis/ResultSingle.java index a122d7e..5a7b2dd 100644 --- a/forester/java/src/org/forester/clade_analysis/ResultSingle.java +++ b/forester/java/src/org/forester/clade_analysis/ResultSingle.java @@ -35,7 +35,7 @@ public final class ResultSingle { private String _greatest_common_prefix = ""; private String _greatest_common_prefix_up = ""; private String _greatest_common_prefix_down = ""; - private final List _warnings = new ArrayList<>(); + private final List _warnings = new ArrayList(); private int _lec_ext_nodes = 0; private int _p_ext_nodes = 0; private String _greatest_common_clade_subtree_confidence = ""; diff --git a/forester/java/src/org/forester/phylogeny/Phylogeny.java b/forester/java/src/org/forester/phylogeny/Phylogeny.java index 0416f41..86aae06 100644 --- a/forester/java/src/org/forester/phylogeny/Phylogeny.java +++ b/forester/java/src/org/forester/phylogeny/Phylogeny.java @@ -327,7 +327,7 @@ public class Phylogeny { */ public List getExternalNodes() { if ( _external_nodes_set == null ) { - _external_nodes_set = new ArrayList<>(); + _external_nodes_set = new ArrayList(); for( final PhylogenyNodeIterator it = iteratorPostorder(); it.hasNext(); ) { final PhylogenyNode n = it.next(); if ( n.isExternal() ) { @@ -441,7 +441,7 @@ public class Phylogeny { if ( isEmpty() ) { return null; } - final List nodes = new ArrayList<>(); + final List nodes = new ArrayList(); for( final PhylogenyNodeIterator iter = iteratorPreorder(); iter.hasNext(); ) { final PhylogenyNode n = iter.next(); if ( n.getName().equals( name ) ) { @@ -455,7 +455,7 @@ public class Phylogeny { if ( isEmpty() ) { return null; } - final List nodes = new ArrayList<>(); + final List nodes = new ArrayList(); for( final PhylogenyNodeIterator iter = iteratorPreorder(); iter.hasNext(); ) { final PhylogenyNode n = iter.next(); if ( n.getName() != null ) { @@ -472,7 +472,7 @@ public class Phylogeny { if ( isEmpty() ) { return null; } - final List nodes = new ArrayList<>(); + final List nodes = new ArrayList(); for( final PhylogenyNodeIterator iter = iteratorPreorder(); iter.hasNext(); ) { final PhylogenyNode n = iter.next(); if ( n.getNodeData().isHasSequence() && n.getNodeData().getSequence().getName().equals( seq_name ) ) { @@ -486,7 +486,7 @@ public class Phylogeny { if ( isEmpty() ) { return null; } - final List nodes = new ArrayList<>(); + final List nodes = new ArrayList(); for( final PhylogenyNodeIterator iter = iteratorPreorder(); iter.hasNext(); ) { final PhylogenyNode n = iter.next(); if ( n.getNodeData().isHasSequence() && n.getNodeData().getSequence().getSymbol().equals( seq_name ) ) { @@ -500,7 +500,7 @@ public class Phylogeny { if ( isEmpty() ) { return null; } - final List nodes = new ArrayList<>(); + final List nodes = new ArrayList(); for( final PhylogenyNodeIterator iter = iteratorPreorder(); iter.hasNext(); ) { final PhylogenyNode n = iter.next(); if ( n.getNodeData().isHasSequence() && n.getNodeData().getSequence().getGeneName().equals( seq_name ) ) { @@ -514,7 +514,7 @@ public class Phylogeny { if ( isEmpty() ) { return null; } - final List nodes = new ArrayList<>(); + final List nodes = new ArrayList(); for( final PhylogenyNodeIterator iter = iteratorPreorder(); iter.hasNext(); ) { final PhylogenyNode n = iter.next(); if ( n.getNodeData().isHasTaxonomy() @@ -539,7 +539,7 @@ public class Phylogeny { if ( isEmpty() ) { return null; } - final List nodes = new ArrayList<>(); + final List nodes = new ArrayList(); for( final PhylogenyNodeIterator iter = iteratorPreorder(); iter.hasNext(); ) { final PhylogenyNode n = iter.next(); if ( PhylogenyMethods.getSpecies( n ).equals( specname ) ) { @@ -638,8 +638,8 @@ public class Phylogeny { public List getParalogousNodes( final PhylogenyNode n, final String[] taxonomyCodeRange ) { PhylogenyNode node = n; PhylogenyNode prev = null; - final List v = new ArrayList<>(); - final Map> map = new HashMap<>(); + final List v = new ArrayList(); + final Map> map = new HashMap>(); getTaxonomyMap( getRoot(), map ); if ( !node.isExternal() || isEmpty() ) { return null; @@ -670,7 +670,7 @@ public class Phylogeny { public Collection getRelevantSequenceRelationTypes() { if ( _relevant_sequence_relation_types == null ) { - _relevant_sequence_relation_types = new Vector<>(); + _relevant_sequence_relation_types = new Vector(); } return _relevant_sequence_relation_types; } @@ -1208,7 +1208,7 @@ public class Phylogeny { * @return List node with the same taxonomy identifier */ private List getNodeByTaxonomyID( final String taxonomyID, final List nodes ) { - final List retour = new ArrayList<>(); + final List retour = new ArrayList(); for( final PhylogenyNode node : nodes ) { if ( taxonomyID.equals( PhylogenyMethods.getTaxonomyIdentifier( node ) ) ) { retour.add( node ); @@ -1226,7 +1226,7 @@ public class Phylogeny { * @return species contains in all leaf under the param node */ private List getSubNodeTaxonomy( final PhylogenyNode node ) { - final List taxonomyList = new ArrayList<>(); + final List taxonomyList = new ArrayList(); final List childs = node.getAllExternalDescendants(); String speciesId = null; for( final PhylogenyNode phylogenyNode : childs ) { diff --git a/forester/java/src/org/forester/rio/RIOUtil.java b/forester/java/src/org/forester/rio/RIOUtil.java index 89b753c..638a757 100644 --- a/forester/java/src/org/forester/rio/RIOUtil.java +++ b/forester/java/src/org/forester/rio/RIOUtil.java @@ -6,7 +6,10 @@ import java.io.FileNotFoundException; import java.io.IOException; import java.math.RoundingMode; import java.util.ArrayList; +import java.util.Iterator; import java.util.List; +import java.util.Map; +import java.util.Map.Entry; import java.util.SortedMap; import java.util.SortedSet; import java.util.TreeSet; @@ -425,6 +428,14 @@ public final class RIOUtil { } if ( !replace_ids && id_map != null && id_map.size() > 0 ) { w.println(); + + final Iterator it = id_map.entrySet().iterator(); + while (it.hasNext()) { + Map.Entry pair = ( Entry ) it.next(); + w.println( pair.getKey() + "\t" + pair.getValue() ); + } //TODO + + /* id_map.forEach( ( k, v ) -> { try { w.println( k + "\t" + v ); @@ -432,7 +443,7 @@ public final class RIOUtil { catch ( final IOException e ) { //ignore } - } ); + } );*/ } w.close(); if ( verbose ) { diff --git a/forester/java/src/org/forester/test/Test.java b/forester/java/src/org/forester/test/Test.java index e3666a8..bbe2591 100644 --- a/forester/java/src/org/forester/test/Test.java +++ b/forester/java/src/org/forester/test/Test.java @@ -1136,7 +1136,7 @@ public final class Test { final Domain d4 = new BasicDomain( "d4", 7, 9, ( short ) 1, ( short ) 1, 0.1, 1 ); final Domain d5 = new BasicDomain( "d4", 0, 9, ( short ) 1, ( short ) 1, 0.1, 1 ); final Domain d6 = new BasicDomain( "d4", 4, 5, ( short ) 1, ( short ) 1, 0.1, 1 ); - final List covered = new ArrayList<>(); + final List covered = new ArrayList(); covered.add( true ); // 0 covered.add( false ); // 1 covered.add( true ); // 2 @@ -1368,7 +1368,7 @@ public final class Test { final Domain d2 = new BasicDomain( "d2", ( short ) 0, ( short ) 20, ( short ) 1, ( short ) 1, 0.1, 1 ); final Domain d3 = new BasicDomain( "d3", ( short ) 9, ( short ) 10, ( short ) 1, ( short ) 1, 0.1, 1 ); final Domain d4 = new BasicDomain( "d4", ( short ) 7, ( short ) 8, ( short ) 1, ( short ) 1, 0.1, 1 ); - final List covered = new ArrayList<>(); + final List covered = new ArrayList(); covered.add( true ); // 0 covered.add( false ); // 1 covered.add( true ); // 2 @@ -1890,25 +1890,25 @@ public final class Test { } private static boolean testCommonPrefix() { - final List l0 = new ArrayList<>(); + final List l0 = new ArrayList(); l0.add( "abc" ); if ( !ForesterUtil.greatestCommonPrefix( l0 ).equals( "abc" ) ) { return false; } - final List l1 = new ArrayList<>(); + final List l1 = new ArrayList(); l1.add( "abc" ); l1.add( "abX" ); if ( !ForesterUtil.greatestCommonPrefix( l1 ).equals( "ab" ) ) { return false; } - final List l2 = new ArrayList<>(); + final List l2 = new ArrayList(); l2.add( "abc" ); l2.add( "abX" ); l2.add( "axy" ); if ( !ForesterUtil.greatestCommonPrefix( l2 ).equals( "a" ) ) { return false; } - final List l3 = new ArrayList<>(); + final List l3 = new ArrayList(); l3.add( "abXsdfsdfsdfsdfsdfsd" ); l3.add( "abXsdfsdfsdfsdfsdfsd" ); l3.add( "abc" ); @@ -1919,7 +1919,7 @@ public final class Test { if ( !ForesterUtil.greatestCommonPrefix( l3 ).equals( "ab" ) ) { return false; } - final List l4 = new ArrayList<>(); + final List l4 = new ArrayList(); l4.add( "abXsdfsdfsdfsdfsdfsd" ); l4.add( "abXsdfsdfsdfsdfsdfsd" ); l4.add( "abc" ); @@ -1929,12 +1929,12 @@ public final class Test { if ( !ForesterUtil.greatestCommonPrefix( l4 ).equals( "" ) ) { return false; } - final List l5 = new ArrayList<>(); + final List l5 = new ArrayList(); l5.add( "" ); if ( !ForesterUtil.greatestCommonPrefix( l5 ).equals( "" ) ) { return false; } - final List l6 = new ArrayList<>(); + final List l6 = new ArrayList(); l6.add( "abc" ); l6.add( "abX" ); l6.add( "" ); @@ -1945,25 +1945,25 @@ public final class Test { } private static boolean testCommonPrefixSep() { - final List l0 = new ArrayList<>(); + final List l0 = new ArrayList(); l0.add( "a.b.c" ); if ( !ForesterUtil.greatestCommonPrefix( l0, "." ).equals( "a.b.c" ) ) { return false; } - final List l1 = new ArrayList<>(); + final List l1 = new ArrayList(); l1.add( "a.b.c" ); l1.add( "a.b.X" ); if ( !ForesterUtil.greatestCommonPrefix( l1, "." ).equals( "a.b" ) ) { return false; } - final List l2 = new ArrayList<>(); + final List l2 = new ArrayList(); l2.add( "a.b.c." ); l2.add( "a.b.X." ); l2.add( "a.x.y." ); if ( !ForesterUtil.greatestCommonPrefix( l2, "." ).equals( "a" ) ) { return false; } - final List l3 = new ArrayList<>(); + final List l3 = new ArrayList(); l3.add( "a/b/X/s/d/f/s/d/f/s/d/f/s/d/f/s/d/f/s/d/" ); l3.add( "a/b/X/s/d/f/s/d/f/s/d/f/s/d/f/s/d/f/s/d" ); l3.add( "a/b/c" ); @@ -1974,7 +1974,7 @@ public final class Test { if ( !ForesterUtil.greatestCommonPrefix( l3, "/" ).equals( "a/b" ) ) { return false; } - final List l4 = new ArrayList<>(); + final List l4 = new ArrayList(); l4.add( "a.b.X.s.d.f.s.d.f.s.d.f.s.d.f.s.d.f.s.d" ); l4.add( "a.b.X.s.d.f.s.d.f.s.d.f.s.d.f.s.d.f.s.d" ); l4.add( "a.b.c" ); @@ -1984,18 +1984,18 @@ public final class Test { if ( !ForesterUtil.greatestCommonPrefix( l4, "." ).equals( "" ) ) { return false; } - final List l5 = new ArrayList<>(); + final List l5 = new ArrayList(); l5.add( "" ); if ( !ForesterUtil.greatestCommonPrefix( l5, "_" ).equals( "" ) ) { return false; } - final List l6 = new ArrayList<>(); + final List l6 = new ArrayList(); l6.add( "_" ); l6.add( "__" ); if ( !ForesterUtil.greatestCommonPrefix( l6, "_" ).equals( "" ) ) { return false; } - final List l7 = new ArrayList<>(); + final List l7 = new ArrayList(); l7.add( "a,b,c" ); l7.add( "a,b,X" ); l7.add( "" ); @@ -2003,21 +2003,21 @@ public final class Test { if ( !ForesterUtil.greatestCommonPrefix( l7, "," ).equals( "" ) ) { return false; } - final List l8 = new ArrayList<>(); + final List l8 = new ArrayList(); l8.add( "123.304.403.04" ); l8.add( "123.304.403.04.02" ); l8.add( "123.304.403.03.03" ); if ( !ForesterUtil.greatestCommonPrefix( l8, "." ).equals( "123.304.403" ) ) { return false; } - final List l9 = new ArrayList<>(); + final List l9 = new ArrayList(); l9.add( "123.304.403.04" ); l9.add( "123.304.403.04.02" ); l9.add( "123.304.402.03.03" ); if ( !ForesterUtil.greatestCommonPrefix( l9, "." ).equals( "123.304" ) ) { return false; } - final List l10 = new ArrayList<>(); + final List l10 = new ArrayList(); l10.add( "abcde" ); l10.add( "adc" ); if ( !ForesterUtil.greatestCommonPrefix( l10, "." ).equals( "" ) ) { @@ -3206,7 +3206,7 @@ public final class Test { p.addProteinDomain( A20 ); p.addProteinDomain( B25 ); p.addProteinDomain( D80 ); - List domains_ids = new ArrayList<>(); + List domains_ids = new ArrayList(); domains_ids.add( "A" ); domains_ids.add( "B" ); domains_ids.add( "C" ); @@ -3223,7 +3223,7 @@ public final class Test { if ( p.contains( domains_ids, true ) ) { return false; } - domains_ids = new ArrayList<>(); + domains_ids = new ArrayList(); domains_ids.add( "A" ); domains_ids.add( "C" ); domains_ids.add( "D" ); @@ -3233,7 +3233,7 @@ public final class Test { if ( !p.contains( domains_ids, true ) ) { return false; } - domains_ids = new ArrayList<>(); + domains_ids = new ArrayList(); domains_ids.add( "A" ); domains_ids.add( "D" ); domains_ids.add( "C" ); @@ -3243,7 +3243,7 @@ public final class Test { if ( p.contains( domains_ids, true ) ) { return false; } - domains_ids = new ArrayList<>(); + domains_ids = new ArrayList(); domains_ids.add( "A" ); domains_ids.add( "A" ); domains_ids.add( "B" ); @@ -3253,7 +3253,7 @@ public final class Test { if ( !p.contains( domains_ids, true ) ) { return false; } - domains_ids = new ArrayList<>(); + domains_ids = new ArrayList(); domains_ids.add( "A" ); domains_ids.add( "A" ); domains_ids.add( "A" ); @@ -3265,7 +3265,7 @@ public final class Test { if ( !p.contains( domains_ids, true ) ) { return false; } - domains_ids = new ArrayList<>(); + domains_ids = new ArrayList(); domains_ids.add( "A" ); domains_ids.add( "A" ); domains_ids.add( "B" ); @@ -3294,7 +3294,7 @@ public final class Test { private static boolean testBasicTable() { try { - final BasicTable t0 = new BasicTable<>(); + final BasicTable t0 = new BasicTable(); if ( t0.getNumberOfColumns() != 0 ) { return false; } @@ -3993,7 +3993,7 @@ public final class Test { final ProteinDomain d2 = new ProteinDomain( "domain2", 50, 60 ); final ProteinDomain d3 = new ProteinDomain( "domain3", 70, 80 ); final ProteinDomain d4 = new ProteinDomain( "domain4", 90, 100 ); - final ArrayList domains0 = new ArrayList<>(); + final ArrayList domains0 = new ArrayList(); domains0.add( d2 ); domains0.add( d0 ); domains0.add( d3 ); @@ -4012,7 +4012,7 @@ public final class Test { if ( ds1.getNumberOfDomains() != 4 ) { return false; } - final ArrayList domains1 = new ArrayList<>(); + final ArrayList domains1 = new ArrayList(); domains1.add( d1 ); domains1.add( d2 ); domains1.add( d4 ); @@ -5749,7 +5749,7 @@ public final class Test { private static boolean testGeneralTable() { try { - final GeneralTable t0 = new GeneralTable<>(); + final GeneralTable t0 = new GeneralTable(); t0.setValue( 3, 2, "23" ); t0.setValue( 10, 1, "error" ); t0.setValue( 10, 1, "110" ); @@ -5785,7 +5785,7 @@ public final class Test { if ( !t0.getValueAsString( 22349, 3434344 ).equals( "" ) ) { return false; } - final GeneralTable t1 = new GeneralTable<>(); + final GeneralTable t1 = new GeneralTable(); t1.setValue( "3", "2", "23" ); t1.setValue( "10", "1", "error" ); t1.setValue( "10", "1", "110" ); @@ -6796,7 +6796,7 @@ public final class Test { private static boolean testMafft( final String path ) { try { - final List opts = new ArrayList<>(); + final List opts = new ArrayList(); opts.add( "--maxiterate" ); opts.add( "1000" ); opts.add( "--localpair" ); @@ -6892,7 +6892,7 @@ public final class Test { final MolecularSequence s1 = BasicSequence.createAaSequence( "b", "ABBXEFGHIJJBB" ); final MolecularSequence s2 = BasicSequence.createAaSequence( "c", "AXCXEFGHIJJ--" ); final MolecularSequence s3 = BasicSequence.createAaSequence( "d", "AXDDEFGHIJ---" ); - final List l = new ArrayList<>(); + final List l = new ArrayList(); l.add( s0 ); l.add( s1 ); l.add( s2 ); @@ -6933,7 +6933,7 @@ public final class Test { final MolecularSequence s1 = BasicSequence.createAaSequence( "b", "AAAIACC" ); final MolecularSequence s2 = BasicSequence.createAaSequence( "c", "AAIIIIF" ); final MolecularSequence s3 = BasicSequence.createAaSequence( "d", "AIIIVVW" ); - final List l = new ArrayList<>(); + final List l = new ArrayList(); l.add( s0 ); l.add( s1 ); l.add( s2 ); @@ -6956,7 +6956,7 @@ public final class Test { // System.out.println( MsaMethods.calcNormalizedShannonsEntropy( 6, msa, 4 ) ); // System.out.println( MsaMethods.calcNormalizedShannonsEntropy( 6, msa, 5 ) ); // System.out.println( MsaMethods.calcNormalizedShannonsEntropy( 6, msa, 6 ) ); - final List l2 = new ArrayList<>(); + final List l2 = new ArrayList(); l2.add( BasicSequence.createAaSequence( "1", "AAAAAAA" ) ); l2.add( BasicSequence.createAaSequence( "2", "AAAIACC" ) ); l2.add( BasicSequence.createAaSequence( "3", "AAIIIIF" ) ); @@ -7000,7 +7000,7 @@ public final class Test { final MolecularSequence s3 = BasicSequence.createAaSequence( "d", "DAAA" ); final MolecularSequence s4 = BasicSequence.createAaSequence( "e", "EAAA" ); final MolecularSequence s5 = BasicSequence.createAaSequence( "f", "FAAA" ); - final List l0 = new ArrayList<>(); + final List l0 = new ArrayList(); l0.add( s0 ); l0.add( s1 ); l0.add( s2 ); @@ -7048,7 +7048,7 @@ public final class Test { final MolecularSequence s_3 = BasicSequence.createAaSequence( "d", "--D--AA-C-------" ); final MolecularSequence s_4 = BasicSequence.createAaSequence( "e", "--E--AA-C-------" ); final MolecularSequence s_5 = BasicSequence.createAaSequence( "f", "--F--AB-CD--Y---" ); - final List l1 = new ArrayList<>(); + final List l1 = new ArrayList(); l1.add( s_0 ); l1.add( s_1 ); l1.add( s_2 ); @@ -7088,7 +7088,7 @@ public final class Test { final MolecularSequence s__3 = BasicSequence.createAaSequence( "d", "DDDD---" ); final MolecularSequence s__4 = BasicSequence.createAaSequence( "e", "EEEEE--" ); final MolecularSequence s__5 = BasicSequence.createAaSequence( "f", "FFFFFF-" ); - final List l2 = new ArrayList<>(); + final List l2 = new ArrayList(); l2.add( s__0 ); l2.add( s__1 ); l2.add( s__2 ); @@ -7154,7 +7154,7 @@ public final class Test { try { final PhylogenyFactory factory = ParserBasedPhylogenyFactory.getInstance(); PhylogenyNode n; - List ext = new ArrayList<>(); + List ext = new ArrayList(); final StringBuffer sb0 = new StringBuffer( "((a,b)ab,(((c,d)cd,e)cde,(f,(g,h))fgh)cdefgh)abcdefgh" ); final Phylogeny t0 = factory.create( sb0.toString(), new NHXParser() )[ 0 ]; t0.getNode( "cd" ).setCollapse( true ); @@ -7189,7 +7189,7 @@ public final class Test { t1.getNode( "cd" ).setCollapse( true ); t1.getNode( "cde" ).setCollapse( true ); n = t1.getNode( "ab" ); - ext = new ArrayList<>(); + ext = new ArrayList(); while ( n != null ) { ext.add( n ); n = n.getNextExternalNodeWhileTakingIntoAccountCollapsedNodes(); @@ -7220,7 +7220,7 @@ public final class Test { t2.getNode( "e" ).setCollapse( true ); t2.getNode( "gh" ).setCollapse( true ); n = t2.getNode( "ab" ); - ext = new ArrayList<>(); + ext = new ArrayList(); while ( n != null ) { ext.add( n ); n = n.getNextExternalNodeWhileTakingIntoAccountCollapsedNodes(); @@ -7249,7 +7249,7 @@ public final class Test { t3.getNode( "gh" ).setCollapse( true ); t3.getNode( "fgh" ).setCollapse( true ); n = t3.getNode( "ab" ); - ext = new ArrayList<>(); + ext = new ArrayList(); while ( n != null ) { ext.add( n ); n = n.getNextExternalNodeWhileTakingIntoAccountCollapsedNodes(); @@ -12565,7 +12565,7 @@ public final class Test { final PhylogenyFactory factory = ParserBasedPhylogenyFactory.getInstance(); final Phylogeny p0 = factory.create( "(((A,B,C),D),(E,(F,G)))R", new NHXParser() )[ 0 ]; //Archaeopteryx.createApplication( p0 ); - final Set ex = new HashSet<>(); + final Set ex = new HashSet(); ex.add( PhylogenyNode.createInstanceFromNhxString( "A" ) ); ex.add( PhylogenyNode.createInstanceFromNhxString( "B" ) ); ex.add( PhylogenyNode.createInstanceFromNhxString( "C" ) ); @@ -12578,13 +12578,13 @@ public final class Test { final TreeSplitMatrix s0 = new TreeSplitMatrix( p0, false, ex ); // System.out.println( s0.toString() ); // - Set query_nodes = new HashSet<>(); + Set query_nodes = new HashSet(); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "A" ) ); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "B" ) ); if ( s0.match( query_nodes ) ) { return false; } - query_nodes = new HashSet<>(); + query_nodes = new HashSet(); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "A" ) ); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "B" ) ); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "C" ) ); @@ -12596,7 +12596,7 @@ public final class Test { return false; } // - query_nodes = new HashSet<>(); + query_nodes = new HashSet(); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "A" ) ); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "B" ) ); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "C" ) ); @@ -12604,7 +12604,7 @@ public final class Test { return false; } // - query_nodes = new HashSet<>(); + query_nodes = new HashSet(); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "D" ) ); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "E" ) ); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "F" ) ); @@ -12613,7 +12613,7 @@ public final class Test { return false; } // - query_nodes = new HashSet<>(); + query_nodes = new HashSet(); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "A" ) ); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "B" ) ); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "C" ) ); @@ -12622,20 +12622,20 @@ public final class Test { return false; } // - query_nodes = new HashSet<>(); + query_nodes = new HashSet(); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "E" ) ); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "F" ) ); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "G" ) ); if ( !s0.match( query_nodes ) ) { return false; } - query_nodes = new HashSet<>(); + query_nodes = new HashSet(); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "F" ) ); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "G" ) ); if ( !s0.match( query_nodes ) ) { return false; } - query_nodes = new HashSet<>(); + query_nodes = new HashSet(); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "E" ) ); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "D" ) ); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "C" ) ); @@ -12644,14 +12644,14 @@ public final class Test { if ( !s0.match( query_nodes ) ) { return false; } - query_nodes = new HashSet<>(); + query_nodes = new HashSet(); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "F" ) ); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "G" ) ); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "E" ) ); if ( !s0.match( query_nodes ) ) { return false; } - query_nodes = new HashSet<>(); + query_nodes = new HashSet(); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "F" ) ); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "G" ) ); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "E" ) ); @@ -12659,13 +12659,13 @@ public final class Test { if ( !s0.match( query_nodes ) ) { return false; } - query_nodes = new HashSet<>(); + query_nodes = new HashSet(); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "F" ) ); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "A" ) ); if ( s0.match( query_nodes ) ) { return false; } - query_nodes = new HashSet<>(); + query_nodes = new HashSet(); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "A" ) ); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "E" ) ); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "B" ) ); @@ -12673,7 +12673,7 @@ public final class Test { if ( s0.match( query_nodes ) ) { return false; } - query_nodes = new HashSet<>(); + query_nodes = new HashSet(); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "F" ) ); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "G" ) ); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "E" ) ); @@ -12682,71 +12682,71 @@ public final class Test { if ( s0.match( query_nodes ) ) { return false; } - query_nodes = new HashSet<>(); + query_nodes = new HashSet(); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "A" ) ); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "B" ) ); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "D" ) ); if ( s0.match( query_nodes ) ) { return false; } - query_nodes = new HashSet<>(); + query_nodes = new HashSet(); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "A" ) ); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "D" ) ); if ( s0.match( query_nodes ) ) { return false; } - query_nodes = new HashSet<>(); + query_nodes = new HashSet(); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "A" ) ); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "B" ) ); if ( s0.match( query_nodes ) ) { return false; } - query_nodes = new HashSet<>(); + query_nodes = new HashSet(); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "A" ) ); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "C" ) ); if ( s0.match( query_nodes ) ) { return false; } - query_nodes = new HashSet<>(); + query_nodes = new HashSet(); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "A" ) ); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "E" ) ); if ( s0.match( query_nodes ) ) { return false; } - query_nodes = new HashSet<>(); + query_nodes = new HashSet(); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "A" ) ); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "F" ) ); if ( s0.match( query_nodes ) ) { return false; } - query_nodes = new HashSet<>(); + query_nodes = new HashSet(); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "A" ) ); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "G" ) ); if ( s0.match( query_nodes ) ) { return false; } - query_nodes = new HashSet<>(); + query_nodes = new HashSet(); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "A" ) ); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "F" ) ); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "G" ) ); if ( s0.match( query_nodes ) ) { return false; } - query_nodes = new HashSet<>(); + query_nodes = new HashSet(); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "A" ) ); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "B" ) ); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "D" ) ); if ( s0.match( query_nodes ) ) { return false; } - query_nodes = new HashSet<>(); + query_nodes = new HashSet(); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "E" ) ); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "D" ) ); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "A" ) ); if ( s0.match( query_nodes ) ) { return false; } - query_nodes = new HashSet<>(); + query_nodes = new HashSet(); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "E" ) ); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "D" ) ); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "A" ) ); @@ -12754,72 +12754,8 @@ public final class Test { if ( s0.match( query_nodes ) ) { return false; } - ///////// - // query_nodes = new HashSet(); - // query_nodes.add( new PhylogenyNode( "X" ) ); - // query_nodes.add( new PhylogenyNode( "Y" ) ); - // query_nodes.add( new PhylogenyNode( "A" ) ); - // query_nodes.add( new PhylogenyNode( "B" ) ); - // query_nodes.add( new PhylogenyNode( "C" ) ); - // query_nodes.add( new PhylogenyNode( "D" ) ); - // query_nodes.add( new PhylogenyNode( "E" ) ); - // query_nodes.add( new PhylogenyNode( "F" ) ); - // query_nodes.add( new PhylogenyNode( "G" ) ); - // if ( !s0.match( query_nodes ) ) { - // return false; - // } - // query_nodes = new HashSet(); - // query_nodes.add( new PhylogenyNode( "X" ) ); - // query_nodes.add( new PhylogenyNode( "Y" ) ); - // query_nodes.add( new PhylogenyNode( "A" ) ); - // query_nodes.add( new PhylogenyNode( "B" ) ); - // query_nodes.add( new PhylogenyNode( "C" ) ); - // if ( !s0.match( query_nodes ) ) { - // return false; - // } - // // - // query_nodes = new HashSet(); - // query_nodes.add( new PhylogenyNode( "X" ) ); - // query_nodes.add( new PhylogenyNode( "Y" ) ); - // query_nodes.add( new PhylogenyNode( "D" ) ); - // query_nodes.add( new PhylogenyNode( "E" ) ); - // query_nodes.add( new PhylogenyNode( "F" ) ); - // query_nodes.add( new PhylogenyNode( "G" ) ); - // if ( !s0.match( query_nodes ) ) { - // return false; - // } - // // - // query_nodes = new HashSet(); - // query_nodes.add( new PhylogenyNode( "X" ) ); - // query_nodes.add( new PhylogenyNode( "Y" ) ); - // query_nodes.add( new PhylogenyNode( "A" ) ); - // query_nodes.add( new PhylogenyNode( "B" ) ); - // query_nodes.add( new PhylogenyNode( "C" ) ); - // query_nodes.add( new PhylogenyNode( "D" ) ); - // if ( !s0.match( query_nodes ) ) { - // return false; - // } - // // - // query_nodes = new HashSet(); - // query_nodes.add( new PhylogenyNode( "X" ) ); - // query_nodes.add( new PhylogenyNode( "Y" ) ); - // query_nodes.add( new PhylogenyNode( "E" ) ); - // query_nodes.add( new PhylogenyNode( "F" ) ); - // query_nodes.add( new PhylogenyNode( "G" ) ); - // if ( !s0.match( query_nodes ) ) { - // return false; - // } - // // - // query_nodes = new HashSet(); - // query_nodes.add( new PhylogenyNode( "X" ) ); - // query_nodes.add( new PhylogenyNode( "Y" ) ); - // query_nodes.add( new PhylogenyNode( "F" ) ); - // query_nodes.add( new PhylogenyNode( "G" ) ); - // if ( !s0.match( query_nodes ) ) { - // return false; - // } - // - query_nodes = new HashSet<>(); + + query_nodes = new HashSet(); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "X" ) ); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "Y" ) ); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "E" ) ); @@ -12828,7 +12764,7 @@ public final class Test { return false; } // - query_nodes = new HashSet<>(); + query_nodes = new HashSet(); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "X" ) ); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "Y" ) ); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "A" ) ); @@ -12836,9 +12772,8 @@ public final class Test { if ( s0.match( query_nodes ) ) { return false; } - /////////////////////////// - // - query_nodes = new HashSet<>(); + + query_nodes = new HashSet(); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "X" ) ); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "Y" ) ); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "A" ) ); @@ -12847,7 +12782,7 @@ public final class Test { return false; } // - query_nodes = new HashSet<>(); + query_nodes = new HashSet(); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "X" ) ); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "Y" ) ); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "A" ) ); @@ -12856,7 +12791,7 @@ public final class Test { return false; } // - query_nodes = new HashSet<>(); + query_nodes = new HashSet(); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "X" ) ); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "Y" ) ); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "A" ) ); @@ -12865,7 +12800,7 @@ public final class Test { return false; } // - query_nodes = new HashSet<>(); + query_nodes = new HashSet(); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "X" ) ); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "Y" ) ); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "A" ) ); @@ -12874,7 +12809,7 @@ public final class Test { return false; } // - query_nodes = new HashSet<>(); + query_nodes = new HashSet(); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "X" ) ); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "Y" ) ); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "A" ) ); @@ -12883,7 +12818,7 @@ public final class Test { return false; } // - query_nodes = new HashSet<>(); + query_nodes = new HashSet(); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "Y" ) ); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "A" ) ); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "G" ) ); @@ -12891,7 +12826,7 @@ public final class Test { return false; } // - query_nodes = new HashSet<>(); + query_nodes = new HashSet(); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "X" ) ); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "Y" ) ); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "A" ) ); @@ -12901,7 +12836,7 @@ public final class Test { return false; } // - query_nodes = new HashSet<>(); + query_nodes = new HashSet(); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "X" ) ); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "Y" ) ); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "A" ) ); @@ -12911,7 +12846,7 @@ public final class Test { return false; } // - query_nodes = new HashSet<>(); + query_nodes = new HashSet(); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "X" ) ); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "Y" ) ); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "E" ) ); @@ -12921,7 +12856,7 @@ public final class Test { return false; } // - query_nodes = new HashSet<>(); + query_nodes = new HashSet(); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "X" ) ); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "Y" ) ); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "E" ) ); @@ -12943,7 +12878,7 @@ public final class Test { try { final PhylogenyFactory factory = ParserBasedPhylogenyFactory.getInstance(); final Phylogeny p0 = factory.create( "(((A,B,C),D),(E,(F,G)))R", new NHXParser() )[ 0 ]; - final Set ex = new HashSet<>(); + final Set ex = new HashSet(); ex.add( PhylogenyNode.createInstanceFromNhxString( "A" ) ); ex.add( PhylogenyNode.createInstanceFromNhxString( "B" ) ); ex.add( PhylogenyNode.createInstanceFromNhxString( "C" ) ); @@ -12952,13 +12887,13 @@ public final class Test { ex.add( PhylogenyNode.createInstanceFromNhxString( "F" ) ); ex.add( PhylogenyNode.createInstanceFromNhxString( "G" ) ); final TreeSplitMatrix s0 = new TreeSplitMatrix( p0, true, ex ); - Set query_nodes = new HashSet<>(); + Set query_nodes = new HashSet(); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "A" ) ); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "B" ) ); if ( s0.match( query_nodes ) ) { return false; } - query_nodes = new HashSet<>(); + query_nodes = new HashSet(); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "A" ) ); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "B" ) ); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "C" ) ); @@ -12970,7 +12905,7 @@ public final class Test { return false; } // - query_nodes = new HashSet<>(); + query_nodes = new HashSet(); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "A" ) ); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "B" ) ); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "C" ) ); @@ -12978,7 +12913,7 @@ public final class Test { return false; } // - query_nodes = new HashSet<>(); + query_nodes = new HashSet(); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "D" ) ); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "E" ) ); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "F" ) ); @@ -12987,7 +12922,7 @@ public final class Test { return false; } // - query_nodes = new HashSet<>(); + query_nodes = new HashSet(); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "A" ) ); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "B" ) ); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "C" ) ); @@ -12996,7 +12931,7 @@ public final class Test { return false; } // - query_nodes = new HashSet<>(); + query_nodes = new HashSet(); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "E" ) ); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "F" ) ); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "G" ) ); @@ -13004,14 +12939,14 @@ public final class Test { return false; } // - query_nodes = new HashSet<>(); + query_nodes = new HashSet(); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "F" ) ); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "G" ) ); if ( !s0.match( query_nodes ) ) { return false; } // - query_nodes = new HashSet<>(); + query_nodes = new HashSet(); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "E" ) ); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "D" ) ); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "C" ) ); @@ -13020,16 +12955,14 @@ public final class Test { if ( !s0.match( query_nodes ) ) { return false; } - // - query_nodes = new HashSet<>(); + query_nodes = new HashSet(); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "F" ) ); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "G" ) ); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "E" ) ); if ( !s0.match( query_nodes ) ) { return false; } - // - query_nodes = new HashSet<>(); + query_nodes = new HashSet(); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "F" ) ); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "G" ) ); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "E" ) ); @@ -13038,14 +12971,14 @@ public final class Test { return false; } // - query_nodes = new HashSet<>(); + query_nodes = new HashSet(); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "F" ) ); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "A" ) ); if ( s0.match( query_nodes ) ) { return false; } // - query_nodes = new HashSet<>(); + query_nodes = new HashSet(); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "A" ) ); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "E" ) ); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "B" ) ); @@ -13054,7 +12987,7 @@ public final class Test { return false; } // - query_nodes = new HashSet<>(); + query_nodes = new HashSet(); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "F" ) ); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "G" ) ); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "E" ) ); @@ -13064,7 +12997,7 @@ public final class Test { return false; } // - query_nodes = new HashSet<>(); + query_nodes = new HashSet(); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "A" ) ); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "B" ) ); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "D" ) ); @@ -13072,49 +13005,49 @@ public final class Test { return false; } // - query_nodes = new HashSet<>(); + query_nodes = new HashSet(); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "A" ) ); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "D" ) ); if ( s0.match( query_nodes ) ) { return false; } // - query_nodes = new HashSet<>(); + query_nodes = new HashSet(); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "A" ) ); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "B" ) ); if ( s0.match( query_nodes ) ) { return false; } // - query_nodes = new HashSet<>(); + query_nodes = new HashSet(); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "A" ) ); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "C" ) ); if ( s0.match( query_nodes ) ) { return false; } // - query_nodes = new HashSet<>(); + query_nodes = new HashSet(); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "A" ) ); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "E" ) ); if ( s0.match( query_nodes ) ) { return false; } // - query_nodes = new HashSet<>(); + query_nodes = new HashSet(); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "A" ) ); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "F" ) ); if ( s0.match( query_nodes ) ) { return false; } // - query_nodes = new HashSet<>(); + query_nodes = new HashSet(); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "A" ) ); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "G" ) ); if ( s0.match( query_nodes ) ) { return false; } // - query_nodes = new HashSet<>(); + query_nodes = new HashSet(); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "A" ) ); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "F" ) ); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "G" ) ); @@ -13122,7 +13055,7 @@ public final class Test { return false; } // - query_nodes = new HashSet<>(); + query_nodes = new HashSet(); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "A" ) ); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "B" ) ); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "D" ) ); @@ -13130,7 +13063,7 @@ public final class Test { return false; } // - query_nodes = new HashSet<>(); + query_nodes = new HashSet(); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "E" ) ); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "D" ) ); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "A" ) ); @@ -13138,7 +13071,7 @@ public final class Test { return false; } // - query_nodes = new HashSet<>(); + query_nodes = new HashSet(); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "E" ) ); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "D" ) ); query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "A" ) ); diff --git a/forester/java/src/org/forester/util/ForesterUtil.java b/forester/java/src/org/forester/util/ForesterUtil.java index 6c14975..f144a81 100644 --- a/forester/java/src/org/forester/util/ForesterUtil.java +++ b/forester/java/src/org/forester/util/ForesterUtil.java @@ -407,7 +407,7 @@ public final class ForesterUtil { } public static String[][] file22dArray( final File file ) throws IOException { - final List list = new ArrayList<>(); + final List list = new ArrayList(); final BufferedReader in = new BufferedReader( new FileReader( file ) ); String str; while ( ( str = in.readLine() ) != null ) { @@ -445,7 +445,7 @@ public final class ForesterUtil { } final public static List file2list( final File file ) throws IOException { - final List list = new ArrayList<>(); + final List list = new ArrayList(); final BufferedReader in = new BufferedReader( new FileReader( file ) ); String str; while ( ( str = in.readLine() ) != null ) { @@ -461,7 +461,7 @@ public final class ForesterUtil { } final public static SortedSet file2set( final File file ) throws IOException { - final SortedSet set = new TreeSet<>(); + final SortedSet set = new TreeSet(); final BufferedReader in = new BufferedReader( new FileReader( file ) ); String str; while ( ( str = in.readLine() ) != null ) { @@ -744,7 +744,7 @@ public final class ForesterUtil { } final public static SortedMap listToSortedCountsMap( final List list ) { - final SortedMap map = new TreeMap<>(); + final SortedMap map = new TreeMap(); for( final Object key : list ) { if ( !map.containsKey( key ) ) { map.put( key, 1 ); @@ -1176,7 +1176,7 @@ public final class ForesterUtil { //urlc.setRequestProperty( "User-Agent", "" ); final BufferedReader in = new BufferedReader( new InputStreamReader( urlc.getInputStream() ) ); String line; - final List result = new ArrayList<>(); + final List result = new ArrayList(); while ( ( line = in.readLine() ) != null ) { result.add( line ); } @@ -1211,7 +1211,7 @@ public final class ForesterUtil { protein.getSpecies().getSpeciesId(), protein.getLength() ); final List sorted = SurfacingUtil.sortDomainsWithAscendingConfidenceValues( protein ); - final List covered_positions = new ArrayList<>(); + final List covered_positions = new ArrayList(); for( final Domain domain : sorted ) { if ( ( ( max_allowed_overlap < 0 ) || ( ForesterUtil.calculateOverlap( domain, covered_positions ) <= max_allowed_overlap ) ) @@ -1686,7 +1686,7 @@ public final class ForesterUtil { public static List spliIntoPrefixes( final String prefix, final String separator ) { final String[] a = prefix.split( Pattern.quote( separator ) ); - final List l = new ArrayList<>(); + final List l = new ArrayList(); for( int i = 0; i < a.length; ++i ) { final StringBuilder sb = new StringBuilder(); for( int j = 0; j <= i; ++j ) { -- 1.7.10.2