Use subSet(…).clear() instead of hand-crafted mechanism.