2 * Copyright (c) 2015 Cisco Systems, Inc. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
8 package org.opendaylight.yangtools.util;
10 import com.google.common.annotations.Beta;
12 import javax.annotation.Nonnull;
15 * A {@link Map} which cannot be modified and supports efficient conversion to a {@link ModifiableMapPhase}.
17 * @param <K> the type of keys maintained by this map
18 * @param <V> the type of mapped values
21 public interface UnmodifiableMapPhase<K, V> extends Map<K, V> {
23 * Return an isolated modifiable version of this map. Its mappings must match the mappings present in this map. Any
24 * modification of the returned map must not be affect the contents of this map.
26 * @return An modifiable version of this map.
28 @Nonnull ModifiableMapPhase<K, V> toModifiableMap();