import intervalstore.api.IntervalStoreI;
import intervalstore.impl.BinarySearcher;
-import intervalstore.impl.IntervalStore;
/**
* A data store for a set of sequence features that supports efficient lookup of
public class FeatureStoreImpl extends FeatureStore
{
+ /**
+ * Default constructor uses NCList
+ */
public FeatureStoreImpl()
{
- features = new IntervalStore<>();
+ this(true);
+ }
+
+ public FeatureStoreImpl(boolean useNCList)
+ {
+ features = (useNCList ? new intervalstore.impl.IntervalStore<>()
+ : new intervalstore.nonc.IntervalStore<>(false));
}
/**
* (creating the IntervalStore if necessary)
*/
@Override
- protected synchronized void addNestedFeature(SequenceFeature feature)
+ protected synchronized void addPositionalFeature(SequenceFeature feature)
{
features.add(feature);
}
return BinarySearcher.findFirst(list, f -> f.getEnd() >= pos);
}
+ @Override
+ protected boolean findAndRemoveNonContactFeature(SequenceFeature sf)
+ {
+ return features.remove(sf);
+ }
+
}