code: public <KK> EntryStream<KK, V> mapToKeyPartial(BiFunction<? super K, ? super V, ? extends Optional<? extends KK>> keyMapper) {
          return new EntryStream<>(stream().map(
                  e -> {
                      KK mapping = keyMapper.apply(e.getKey(), e.getValue()).orElse(null);
                      return mapping != null ? new SimpleImmutableEntry<>(mapping, e.getValue()) : null;
                  }
          ).filter(Objects::nonNull), context);
      }
docs: Performs a mapping of the stream content to a partial function
  removing the entries to which the function is not applicable.
  
  <p>
  If the mapping function returns an optional containing a new key,
  or {@link Optional#empty()} if function is not applicable to the entry.
  For successfully mapped keys the values are left intact. The mapping function
  may not return null.
  
  <p>
  This is an <a href="package-summary.html#StreamOps">intermediate
  operation</a>.
  
  <p>
  The {@code mapToValuePartial()} operation has the effect of applying a
  one-to-zero-or-one transformation to the elements of the stream, and then
  flattening the resulting elements into a new stream.
  
  @param <KK>        The type of new keys
  @param keyMapper a <a
  href="package-summary.html#NonInterference">non-interfering </a>,
  <a href="package-summary.html#Statelessness">stateless</a>
  partial function to apply to original keys and values which returns a present optional
  if it's applicable, or an empty optional otherwise
  @return the new stream
  @since 0.6.8