From: gmungoc Date: Thu, 14 Apr 2016 11:20:29 +0000 (+0100) Subject: JAL-2049 small refactor of constructors to avoid code duplication X-Git-Tag: Release_2_10_0~249^2~22 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=7ecacfd7a5977fdc69d4e81d5ec24b049ff927e0;p=jalview.git JAL-2049 small refactor of constructors to avoid code duplication --- diff --git a/src/jalview/datamodel/SequenceFeature.java b/src/jalview/datamodel/SequenceFeature.java index 4a7706f..4c9aa05 100755 --- a/src/jalview/datamodel/SequenceFeature.java +++ b/src/jalview/datamodel/SequenceFeature.java @@ -111,26 +111,57 @@ public class SequenceFeature } } + /** + * Constructor including a Status value + * + * @param type + * @param desc + * @param status + * @param begin + * @param end + * @param featureGroup + */ public SequenceFeature(String type, String desc, String status, int begin, int end, String featureGroup) { + this(type, desc, begin, end, featureGroup); + setStatus(status); + } + + /** + * Constructor + * + * @param type + * @param desc + * @param begin + * @param end + * @param featureGroup + */ + SequenceFeature(String type, String desc, int begin, int end, + String featureGroup) + { this.type = type; this.description = desc; - setValue(STATUS, status); this.begin = begin; this.end = end; this.featureGroup = featureGroup; } + /** + * Constructor including a score value + * + * @param type + * @param desc + * @param begin + * @param end + * @param score + * @param featureGroup + */ public SequenceFeature(String type, String desc, int begin, int end, float score, String featureGroup) { - this.type = type; - this.description = desc; - this.begin = begin; - this.end = end; + this(type, desc, begin, end, featureGroup); this.score = score; - this.featureGroup = featureGroup; } /**