JAL-1645 Version-Rel Version 2.9 Year-Rel 2015 Licensing glob
[jalview.git] / src / jalview / datamodel / UniprotSequence.java
index 12f26e1..c9b84fa 100755 (executable)
@@ -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)
+ * Copyright (C) 2015 The Jalview Authors
  * 
  * This file is part of Jalview.
  * 
  */
 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()