guava/src/com/google/common/collect/ImmutableMap.java
static <K, V> Entry<K, V> entryOf(K key, V value) {
    checkEntryNotNull(key, value);
    return new AbstractMap.SimpleImmutableEntry<>(key, value);
  }
static <K, V> Entry<K, V> entryOf(K key, V value) {
    checkEntryNotNull(key, value);
    return new AbstractMap.SimpleImmutableEntry<>(key, value);
  }
Verifies that {@code key} and {@code value} are non-null, and returns a new immutable entry
with those values.

<p>A call to {@link Entry#setValue} on the returned entry will always throw {@link
UnsupportedOperationException}.