public final String featureGroup;
- public float score;
+ public final float score;
public String description;
*/
public SequenceFeature(SequenceFeature cpy)
{
- this(cpy, cpy.getBegin(), cpy.getEnd(), cpy.getFeatureGroup());
+ this(cpy, cpy.getBegin(), cpy.getEnd(), cpy.getFeatureGroup(), cpy
+ .getScore());
}
/**
public SequenceFeature(String theType, String theDesc, int theBegin,
int theEnd, float theScore, String group)
{
- this(theType, theDesc, theBegin, theEnd, group);
+ this.type = theType;
+ this.description = theDesc;
+ this.begin = theBegin;
+ this.end = theEnd;
+ this.featureGroup = group;
this.score = theScore;
}
/**
- * A copy constructor that allows the begin and end positions and group to be
- * modified
+ * 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)
+ String newGroup, float newScore)
{
- this(sf.getType(), newBegin, newEnd, newGroup);
- score = sf.score;
- description = sf.description;
+ this(sf.getType(), sf.getDescription(), newBegin, newEnd, newScore,
+ newGroup);
+
if (sf.otherDetails != null)
{
otherDetails = new HashMap<String, Object>();
}
/**
- * Constructor that sets the final fields type, begin, end, group
- *
- * @param theType
- * @param theBegin
- * @param theEnd
- * @param theGroup
- */
- private SequenceFeature(String theType, int theBegin, int theEnd,
- String theGroup)
- {
- type = theType;
- begin = theBegin;
- end = theEnd;
- featureGroup = theGroup;
- }
-
- /**
* 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.
return score;
}
- public void setScore(float value)
- {
- score = value;
- }
-
/**
* Used for getting values which are not in the basic set. eg STRAND, PHASE
* for GFF file