}
@Override
- public synchronized void addSequenceFeature(SequenceFeature sf)
+ public synchronized boolean addSequenceFeature(SequenceFeature sf)
{
if (sequenceFeatures == null && datasetSequence != null)
{
- datasetSequence.addSequenceFeature(sf);
- return;
+ return datasetSequence.addSequenceFeature(sf);
}
if (sequenceFeatures == null)
{
{
if (sequenceFeatures[i].equals(sf))
{
- return;
+ return false;
}
}
temp[sequenceFeatures.length] = sf;
sequenceFeatures = temp;
+ return true;
}
@Override
*/
public void addDBRef(DBRefEntry entry);
- public void addSequenceFeature(SequenceFeature sf);
+ /**
+ * Adds the given sequence feature and returns true, or returns false if it is
+ * already present on the sequence
+ *
+ * @param sf
+ * @return
+ */
+ public boolean addSequenceFeature(SequenceFeature sf);
public void deleteFeature(SequenceFeature sf);