/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.2b1)
- * Copyright (C) 2014 The Jalview Authors
+ * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
+ * Copyright (C) $$Year-Rel$$ 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()