JAL-2505 use constructors to set (what will be) final fields in
[jalview.git] / src / jalview / datamodel / SequenceFeature.java
index 8eacb68..719cf52 100755 (executable)
@@ -178,6 +178,24 @@ public class SequenceFeature implements FeatureLocationI
   }
 
   /**
+   * A copy constructor that allows the begin and end positions and group to be
+   * modified
+   * 
+   * @param sf
+   * @param newBegin
+   * @param newEnd
+   * @param newGroup
+   */
+  public SequenceFeature(SequenceFeature sf, int newBegin, int newEnd,
+          String newGroup)
+  {
+    this(sf);
+    begin = newBegin;
+    end = newEnd;
+    featureGroup = newGroup;
+  }
+
+  /**
    * Two features are considered equal if they have the same type, group,
    * description, start, end, phase, strand, and (if present) 'Name', ID' and
    * 'Parent' attributes.