X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fintervalstore%2Fapi%2FIntervalStoreI.java;fp=src%2Fintervalstore%2Fapi%2FIntervalStoreI.java;h=43aea2b7e71f962349450784389f426e93a312ab;hb=b74cdec4b07000bee431a7cca86a948f44d3ffbe;hp=3b0f575c7e689258c8dfe3cc43d495f50f75b37e;hpb=6f2c3b8cb30d8ccf7ff9ab949a7b244f0c415bc1;p=jalview.git diff --git a/src/intervalstore/api/IntervalStoreI.java b/src/intervalstore/api/IntervalStoreI.java index 3b0f575..43aea2b 100644 --- a/src/intervalstore/api/IntervalStoreI.java +++ b/src/intervalstore/api/IntervalStoreI.java @@ -91,6 +91,30 @@ public interface IntervalStoreI extends Collection */ boolean revalidate(); + /** + * Get the i-th interval, whatever that means to this store. + * + * @param i + * @return + */ IntervalI get(int i); + /** + * Check to see if this store can check for duplicates while adding. + * + * @return + */ + boolean canCheckForDuplicates(); + + /** + * Add with a check for duplicates, if possible. + * + * @param interval + * @param checkForDuplicate + * @return false only if addition was unsuccessful because there was an + * identical interval already in the store or because the store cannot + * check for duplicates + */ + boolean add(T interval, boolean checkForDuplicate); + } \ No newline at end of file