docs: private void clear(IntSet segments, boolean keepSegments) {
        for (Iterator<K> keyIterator = entries.keySet().iterator(); keyIterator.hasNext(); ) {
           K key = keyIterator.next();
           int keySegment = getSegmentForKey(key);
           if (keepSegments != segments.contains(keySegment)) {
              keyIterator.remove();
           }
        }
     }