import java.util.ArrayList;
import java.util.List;
-import intervalstore.nonc.IntervalStore;
-
/**
* An adaption of FeatureStore that is efficient and lightweight, accelerating
* processing speed in JavaScript.
*/
public class FeatureStoreJS extends FeatureStore
{
- private IntervalStore<SequenceFeature> featureStore;
+
public FeatureStoreJS()
{
- // the only reference to features field in this class -- for the superclass
-
- // linked-list no-NCList IntervalStore with presort
+ super();
+ }
- features = featureStore = new IntervalStore<>(true);
+ public FeatureStoreJS(int option)
+ {
+ super(option);
}
/**
return true;
}
-
/**
* Add a feature to the IntervalStore, not allowing for duplicates.
*
protected synchronized boolean addPositionalFeature(
SequenceFeature feature)
{
- return featureStore.add(feature, false);
+ return features.add(feature, false);
}
/**
@Override
protected boolean containsFeature(SequenceFeature feature)
{
- return featureStore.contains(feature);
+ return features.contains(feature);
}
@Override
protected boolean findAndRemoveNonContactFeature(SequenceFeature sf)
{
- return featureStore.remove(sf);
+ return features.remove(sf);
}
/**
findContactFeatures(start, end, result);
}
}
- if (featureStore.size() > 0)
+ if (features.size() > 0)
{
- featureStore.findOverlaps(start, end, result);
+ features.findOverlaps(start, end, result);
}
return result;
}