X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fdatamodel%2FUniprotSequence.java;h=cca8b7ed3204980b116cb58e2f4781b0874ec385;hb=c19d2a91ca05e052e3408bf5852d88eb5d0608f1;hp=12f26e1bc9d484c17c67e21cfa08a56d4a56c630;hpb=47168f025aefdaa044802bd5f8f510ffe43a4808;p=jalview.git diff --git a/src/jalview/datamodel/UniprotSequence.java b/src/jalview/datamodel/UniprotSequence.java index 12f26e1..cca8b7e 100755 --- a/src/jalview/datamodel/UniprotSequence.java +++ b/src/jalview/datamodel/UniprotSequence.java @@ -1,6 +1,6 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.2) - * Copyright (C) 2014 The Jalview Authors + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.9.0b2) + * Copyright (C) 2015 The Jalview Authors * * This file is part of Jalview. * @@ -20,24 +20,34 @@ */ package jalview.datamodel; +/** + * Data model for the sequence returned by a Uniprot query + * + * @see uniprot_mapping.xml + */ public class UniprotSequence { + private String _content = ""; + /** - * internal content storage + * Sets the content string, omitting any space characters + * + * @param seq */ - private java.lang.String _content = ""; - public void setContent(String seq) { - StringBuffer sb = new StringBuffer(); - for (int i = 0; i < seq.length(); i++) + if (seq != null) { - if (seq.charAt(i) != ' ') + StringBuilder sb = new StringBuilder(seq.length()); + for (int i = 0; i < seq.length(); i++) { - sb.append(seq.charAt(i)); + if (seq.charAt(i) != ' ') + { + sb.append(seq.charAt(i)); + } } + _content = sb.toString(); } - _content = sb.toString(); } public String getContent()