X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fjalview%2Fdatamodel%2FAnnotation.java;h=8de8eb25847d05284b17e8e442e83e070a8848bc;hb=46406ae21c62b964714ce136c9d692985c17211d;hp=fc8688caba6f670dce379436eb0fb867b40386d3;hpb=fc9096e49533361ffb654d08d65ee21129eb3875;p=jalview.git diff --git a/src/jalview/datamodel/Annotation.java b/src/jalview/datamodel/Annotation.java index fc8688c..8de8eb2 100755 --- a/src/jalview/datamodel/Annotation.java +++ b/src/jalview/datamodel/Annotation.java @@ -198,4 +198,18 @@ public class Annotation } return sb.toString(); } + + /** + * @return true if annot is 'whitespace' annotation (zero score, whitespace or + * zero length display character, label, description + */ + public boolean isWhitespace() + { + return ((value == 0f) + && ((description == null) || (description.trim() + .length() == 0)) + && ((displayCharacter == null) || (displayCharacter + .trim().length() == 0)) + && (secondaryStructure == '\0' || (secondaryStructure == ' ')) && colour == null); + } }