JAL-1645 source formatting and organise imports
[jalview.git] / src / jalview / datamodel / SequenceDummy.java
index 80b0072..f472a71 100644 (file)
@@ -6,4 +6,28 @@ public class SequenceDummy extends Sequence implements SequenceI
   {
     super(sequenceId, "THISAPLACEHOLDER");
   }
+
+  private boolean dummy = true;
+
+  /**
+   * become a proxy for mseq, merging any existing annotation on this sequence
+   * 
+   * @param mseq
+   */
+  public void become(SequenceI mseq)
+  {
+    initSeqFrom(mseq, null);
+    dummy = false;
+  }
+
+  /**
+   * Test if the SequenceDummy has been promoted to a real sequence via
+   * SequenceDummy.become
+   * 
+   * @return true if this is a placeholder and contains no actual sequence data
+   */
+  public boolean isDummy()
+  {
+    return dummy;
+  }
 }