X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fdatamodel%2FAlignment.java;h=5d91b36cc01a05cb016ff0edc167d0764c592275;hb=3f91bb1385ab9ac8fdd15e3bc9378f5b554e1642;hp=fcb61092786c947fdfb978596634d25de4a5d13f;hpb=cd126a7085c5ebcfc8c05378c71bd862abc4fd91;p=jalview.git diff --git a/src/jalview/datamodel/Alignment.java b/src/jalview/datamodel/Alignment.java index fcb6109..5d91b36 100755 --- a/src/jalview/datamodel/Alignment.java +++ b/src/jalview/datamodel/Alignment.java @@ -73,7 +73,7 @@ public class Alignment implements AlignmentI groups = Collections.synchronizedList(new ArrayList()); hiddenSequences = new HiddenSequences(this); hiddenCols = new HiddenColumns(); - codonFrameList = new ArrayList(); + codonFrameList = new ArrayList<>(); nucleotide = Comparison.isNucleotide(seqs); @@ -405,7 +405,7 @@ public class Alignment implements AlignmentI @Override public SequenceGroup[] findAllGroups(SequenceI s) { - ArrayList temp = new ArrayList(); + ArrayList temp = new ArrayList<>(); synchronized (groups) { @@ -456,7 +456,7 @@ public class Alignment implements AlignmentI return; } } - sg.setContext(this); + sg.setContext(this, true); groups.add(sg); } } @@ -533,7 +533,7 @@ public class Alignment implements AlignmentI } for (SequenceGroup sg : groups) { - sg.setContext(null); + sg.setContext(null, false); } groups.clear(); } @@ -549,7 +549,7 @@ public class Alignment implements AlignmentI { removeAnnotationForGroup(g); groups.remove(g); - g.setContext(null); + g.setContext(null, false); } } } @@ -1071,7 +1071,7 @@ public class Alignment implements AlignmentI { return; } - List toProcess = new ArrayList(); + List toProcess = new ArrayList<>(); toProcess.add(currentSeq); while (toProcess.size() > 0) { @@ -1124,7 +1124,7 @@ public class Alignment implements AlignmentI return; } // try to avoid using SequenceI.equals at this stage, it will be expensive - Set seqs = new LinkedIdentityHashSet(); + Set seqs = new LinkedIdentityHashSet<>(); for (int i = 0; i < getHeight(); i++) { @@ -1409,7 +1409,7 @@ public class Alignment implements AlignmentI { return null; } - List cframes = new ArrayList(); + List cframes = new ArrayList<>(); for (AlignedCodonFrame acf : getCodonFrames()) { if (acf.involvesSequence(seq)) @@ -1486,7 +1486,7 @@ public class Alignment implements AlignmentI if (sqs != null) { // avoid self append deadlock by - List toappendsq = new ArrayList(); + List toappendsq = new ArrayList<>(); synchronized (sqs) { for (SequenceI addedsq : sqs) @@ -1627,7 +1627,7 @@ public class Alignment implements AlignmentI @Override public Iterable findAnnotation(String calcId) { - List aa = new ArrayList(); + List aa = new ArrayList<>(); AlignmentAnnotation[] alignmentAnnotation = getAlignmentAnnotation(); if (alignmentAnnotation != null) { @@ -1648,7 +1648,7 @@ public class Alignment implements AlignmentI public Iterable findAnnotations(SequenceI seq, String calcId, String label) { - ArrayList aa = new ArrayList(); + ArrayList aa = new ArrayList<>(); for (AlignmentAnnotation ann : getAlignmentAnnotation()) { if ((calcId == null || (ann.getCalcId() != null && ann.getCalcId() @@ -1853,7 +1853,7 @@ public class Alignment implements AlignmentI @Override public Set getSequenceNames() { - Set names = new HashSet(); + Set names = new HashSet<>(); for (SequenceI seq : getSequences()) { names.add(seq.getName());