code: private static <K, V> Collection<Entry<K, V>> unmodifiableEntries(
        Collection<Entry<K, V>> entries) {
      if (entries instanceof Set) {
        return Maps.unmodifiableEntrySet((Set<Entry<K, V>>) entries);
      }
      return new Maps.UnmodifiableEntries<>(Collections.unmodifiableCollection(entries));
    }
docs: Returns an unmodifiable view of the specified collection of entries. The {@link Entry#setValue}
  operation throws an {@link UnsupportedOperationException}. If the specified collection is a
  {@code Set}, the returned collection is also a {@code Set}.
  
  @param entries the entries for which to return an unmodifiable view
  @return an unmodifiable view of the entries