code: public static <K, V> Map.Entry<K, V> newMapEntry(K key, V value) {
  
      return new Map.Entry<K, V>() {
  
        @Override
        public K getKey() {
          return key;
        }
  
        @Override
        public V getValue() {
          return value;
        }
  
        @Override
        public V setValue(V value) {
          throw new UnsupportedOperationException(Constants.OPERATION_NOT_SUPPORTED);
        }
      };
    }
docs: Constructs a new instance of {@link Map.Entry} initialized with the given key and value.
  
  @param <K> {@link Class} type of the key.
  @param <V> {@link Class} type of the value.
  @param key key of the new {@link Map.Entry}.
  @param value value of the new {@link Map.Entry}.
  @return a new {@link Map.Entry} initialized with the given key and value.
  @see java.util.Map.Entry