JAL-4090 JAL-1551 spotlessApply
[jalview.git] / src / jalview / datamodel / Sequence.java
index 7a5d5bc..cc21f35 100755 (executable)
@@ -353,7 +353,7 @@ public class Sequence extends ASequence implements SequenceI
           // only copy the given annotation
           AlignmentAnnotation newann = new AlignmentAnnotation(sqann[i]);
           ContactMatrixI cm = seq.getContactMatrixFor(sqann[i]);
-          if (cm!=null)
+          if (cm != null)
           {
             addContactListFor(newann, cm);
           }
@@ -1646,7 +1646,7 @@ public class Sequence extends ASequence implements SequenceI
         }
       }
       // all matrices should have been transferred. so we clear the local holder
-      _cmholder=null;
+      _cmholder = null;
     }
     return datasetSequence;
   }
@@ -1756,11 +1756,12 @@ public class Sequence extends ASequence implements SequenceI
     }
     // transfer from entry to sequence
     // if entry has a description and sequence doesn't, then transfer
-    if (entry.getDescription()!=null && (description==null || description.trim().length()==0))
+    if (entry.getDescription() != null
+            && (description == null || description.trim().length() == 0))
     {
       description = entry.getDescription();
     }
-    
+
     // transfer any new features from entry onto sequence
     if (entry.getSequenceFeatures() != null)
     {
@@ -2142,15 +2143,17 @@ public class Sequence extends ASequence implements SequenceI
 
   private ContactMapHolderI getContactMapHolder()
   {
-    if (datasetSequence!=null) {
-      return ((Sequence)datasetSequence).getContactMapHolder();
+    if (datasetSequence != null)
+    {
+      return ((Sequence) datasetSequence).getContactMapHolder();
     }
-    if (_cmholder==null)
+    if (_cmholder == null)
     {
-      _cmholder=new ContactMapHolder();
+      _cmholder = new ContactMapHolder();
     }
     return _cmholder;
   }
+
   @Override
   public Collection<ContactMatrixI> getContactMaps()
   {
@@ -2173,7 +2176,7 @@ public class Sequence extends ASequence implements SequenceI
   public AlignmentAnnotation addContactList(ContactMatrixI cm)
   {
     AlignmentAnnotation aa;
-    
+
     if (datasetSequence != null)
     {
       aa = datasetSequence.addContactList(cm);
@@ -2181,11 +2184,11 @@ public class Sequence extends ASequence implements SequenceI
       aa = new AlignmentAnnotation(aa);
       aa.restrict(start, end);
       aa.adjustForAlignment();
-      getContactMapHolder().addContactListFor(aa,cm);
+      getContactMapHolder().addContactListFor(aa, cm);
       addAlignmentAnnotation(aa);
       return aa;
     }
-    
+
     // construct new annotation for matrix on dataset sequence
     aa = getContactMapHolder().addContactList(cm);