code: public final boolean removeIf(BiPredicate<? super K, ? super V> filter) {
          Objects.requireNonNull(filter);
          if (isEmpty())
              return false;
          Segment<K, V> segment;
          int mc = this.modCount;
          int initialModCount = mc;
          for (long segmentIndex = 0; segmentIndex >= 0;
               segmentIndex = nextSegmentIndex(segmentIndex, segment)) {
              mc = (segment = segment(segmentIndex)).removeIf(this, filter, mc);
          }
          if (mc != modCount)
              throw new ConcurrentModificationException();
          return mc != initialModCount;
      }
docs: Removes all of the entries of this map that satisfy the given predicate. Errors or runtime
  exceptions thrown during iteration or by the predicate are relayed to the caller.
  
  <p>Note the order in which this method visits entries is <i>different</i> from the iteration
  and {@link #forEach(BiConsumer)} order.
  
  @param filter a predicate which returns {@code true} for entries to be removed
  @return {@code true} if any entries were removed
  @throws NullPointerException if the specified {@code filter} is {@code null}
  @throws ConcurrentModificationException if any structural modification of the map (new entry
  insertion or an entry removal) is detected during iteration