package jetbrains.mps.internal.collections.runtime;

/*Generated by MPS */

import java.util.Map;
import jetbrains.mps.references.Reference;

public interface IMapSequence<U, V> extends ISequence<IMapping<U, V>>, Map<U, V> {
  ISetSequence<IMapping<U, V>> mappingsSet();
  IMapSequence<U, V> putAll(IMapSequence<? extends U, ? extends V> map);
  V putValue(U key, V value);
  V removeKey(U u);
  Map<U, V> toMap();

  default Reference<V> getValueRef(final U key) {
    return new Reference<V>() {
      public V get() {
        return IMapSequence.this.get(key);
      }
      public void set(V value) {
        IMapSequence.this.put(key, value);
      }
    };
  }
}
