X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fdatamodel%2FSequenceFeature.java;h=9c4087e96709ff4c2733e4114e5f63a948129d69;hb=f5e0f36fc8da4fd18f255bf3cc82005a2b94e245;hp=9a6cf2b1191484c17c0094ff601926c8ddff0d02;hpb=ab222dff0212dbe29d7c958a365963c41dc16d38;p=jalview.git diff --git a/src/jalview/datamodel/SequenceFeature.java b/src/jalview/datamodel/SequenceFeature.java index 9a6cf2b..9c4087e 100755 --- a/src/jalview/datamodel/SequenceFeature.java +++ b/src/jalview/datamodel/SequenceFeature.java @@ -143,15 +143,16 @@ public class SequenceFeature implements FeatureLocationI * A copy constructor that allows the value of final fields to be 'modified' * * @param sf + * @param newType * @param newBegin * @param newEnd * @param newGroup * @param newScore */ - public SequenceFeature(SequenceFeature sf, int newBegin, int newEnd, - String newGroup, float newScore) + public SequenceFeature(SequenceFeature sf, String newType, int newBegin, + int newEnd, String newGroup, float newScore) { - this(sf.getType(), sf.getDescription(), newBegin, newEnd, newScore, + this(newType, sf.getDescription(), newBegin, newEnd, newScore, newGroup); if (sf.otherDetails != null) @@ -173,6 +174,21 @@ public class SequenceFeature implements FeatureLocationI } /** + * A copy constructor that allows the value of final fields to be 'modified' + * + * @param sf + * @param newBegin + * @param newEnd + * @param newGroup + * @param newScore + */ + public SequenceFeature(SequenceFeature sf, int newBegin, int newEnd, + String newGroup, float newScore) + { + this(sf, sf.getType(), newBegin, newEnd, newGroup, newScore); + } + + /** * 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. @@ -217,8 +233,8 @@ public class SequenceFeature implements FeatureLocationI return false; } - if (!(type + description + featureGroup + getPhase()).equals(sf.type - + sf.description + sf.featureGroup + sf.getPhase())) + if (!(type + description + featureGroup + getPhase()).equals( + sf.type + sf.description + sf.featureGroup + sf.getPhase())) { return false; }