From 77b038f418aea84563953ad94f839592317ea500 Mon Sep 17 00:00:00 2001 From: jprocter Date: Wed, 2 May 2007 12:20:10 +0000 Subject: [PATCH] return flag indicating if annotations were actually deleted from alignment --- src/jalview/datamodel/Alignment.java | 5 +++-- src/jalview/datamodel/AlignmentI.java | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/jalview/datamodel/Alignment.java b/src/jalview/datamodel/Alignment.java index 536ccab..cec2abc 100755 --- a/src/jalview/datamodel/Alignment.java +++ b/src/jalview/datamodel/Alignment.java @@ -463,7 +463,7 @@ public class Alignment /* (non-Javadoc) * @see jalview.datamodel.AlignmentI#deleteAnnotation(jalview.datamodel.AlignmentAnnotation) */ - public void deleteAnnotation(AlignmentAnnotation aa) + public boolean deleteAnnotation(AlignmentAnnotation aa) { int aSize = 1; @@ -474,7 +474,7 @@ public class Alignment if (aSize < 1) { - return; + return false; } AlignmentAnnotation[] temp = new AlignmentAnnotation[aSize - 1]; @@ -500,6 +500,7 @@ public class Alignment if(aa.sequenceRef!=null) aa.sequenceRef.removeAlignmentAnnotation(aa); } + return swap; } /** diff --git a/src/jalview/datamodel/AlignmentI.java b/src/jalview/datamodel/AlignmentI.java index ef1862e..34a5ff2 100755 --- a/src/jalview/datamodel/AlignmentI.java +++ b/src/jalview/datamodel/AlignmentI.java @@ -184,8 +184,9 @@ public interface AlignmentI * vector. Otherwise, it will do nothing. * * @param aa the annotation to delete + * @return true if annotation was deleted from this alignment. */ - public void deleteAnnotation(AlignmentAnnotation aa); + public boolean deleteAnnotation(AlignmentAnnotation aa); /** * Get the annotation associated with this alignment -- 1.7.10.2