boolean (@NotNull T interval) { if (!((RangeMarkerEx)interval).isValid()) return false; l.writeLock().lock(); try { incModCount(); if (!((RangeMarkerEx)interval).isValid()) return false; checkBelongsToTheTree(interval, true); checkMax(true); processReferenceQueue(); IntervalNode<T> node = lookupNode(interval); if (node == null) return false; beforeRemove(interval, node); node.removeInterval(interval); return true; } finally { setNode(interval, null); l.writeLock().unlock(); fireAfterRemoved(interval); } }