// only construct nonPositionalFeatures or contactFeatures if needed
}
+ /**
+ * Returns a new instance of IntervalStoreI of implementation as selected by
+ * the type parameter
+ *
+ * @param type
+ * @return
+ */
private IntervalStoreI<SequenceFeature> getIntervalStore(
IntervalStoreType type)
{
return result;
}
+ /**
+ * Returns a (possibly empty) list of stored contact features
+ *
+ * @return
+ */
public List<SequenceFeature> getContactFeatures()
{
- return getContactFeatures(new ArrayList<>());
+ List<SequenceFeature> result = new ArrayList<>();
+ getContactFeatures(result);
+ return result;
}
/**
- * Answers a list of all contact features. If there are none, returns an
- * immutable empty list.
+ * Adds any stored contact features to the result list
*
* @return
*/
- public List<SequenceFeature> getContactFeatures(
- List<SequenceFeature> result)
+ public void getContactFeatures(List<SequenceFeature> result)
{
if (contactFeatureStarts != null)
{
result.addAll(contactFeatureStarts);
}
- return result;
}
/**