if (key instanceof Passage) { Passage that = (Passage) key; fireIntervalRemoved(this, that.getVerseAt(0), that.getVerseAt(that.countVerses() - 1)); } else if (key instanceof VerseRange) { VerseRange that = (VerseRange) key; fireIntervalRemoved(this, that.getStart(), that.getEnd()); } else if (key instanceof Verse) { Verse that = (Verse) key; fireIntervalRemoved(this, that, that);
public void clear() { optimizeWrites(); raiseNormalizeProtection(); remove(getVersification().getAllVerses()); if (lowerEventSuppressionAndTest()) { fireIntervalRemoved(this, null, null); } }
public void retainAll(Key key) { optimizeWrites(); raiseEventSuppresion(); raiseNormalizeProtection(); Passage temp = this.clone(); for (Key verse : temp) { if (!key.contains(verse)) { remove(verse); } } lowerNormalizeProtection(); if (lowerEventSuppressionAndTest()) { fireIntervalRemoved(this, null, null); } }