X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fdatamodel%2Ffeatures%2FFeatureStore.java;fp=src%2Fjalview%2Fdatamodel%2Ffeatures%2FFeatureStore.java;h=ccd8b66af9774e88b13d58b6720b3f6feb91484a;hb=8406f2ced29d2c04dbabaf1cde80b1a7fa8ce8ce;hp=fe575e0186e0ee76ed8cd259effc80c8b38d99f9;hpb=c131770ae5b4886cf3dfe7779e72c9e9e0c73e42;p=jalview.git diff --git a/src/jalview/datamodel/features/FeatureStore.java b/src/jalview/datamodel/features/FeatureStore.java index fe575e0..ccd8b66 100644 --- a/src/jalview/datamodel/features/FeatureStore.java +++ b/src/jalview/datamodel/features/FeatureStore.java @@ -316,10 +316,7 @@ public abstract class FeatureStore implements FeatureStoreI * Adds one feature to the IntervalStore that can manage nested features * (creating the IntervalStore if necessary) */ - protected synchronized void addNestedFeature(SequenceFeature feature) - { - features.add(feature); - } + abstract protected void addNestedFeature(SequenceFeature feature); /** * Adds the feature to the list of non-positional features (with lazy @@ -366,9 +363,12 @@ public abstract class FeatureStore implements FeatureStoreI && listContains(contactFeatureStarts, feature); } - return features == null ? false : features.contains(feature); + return features == null ? false : containsFeature(feature); } + + abstract protected boolean containsFeature(SequenceFeature feature); + /** * Deletes the given feature from the store, returning true if it was found * (and deleted), else false. This method makes no assumption that the feature