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 org.eclipse.jdt.annotation.NonNull;
13 import org.opendaylight.yangtools.concepts.Immutable;
16 * A {@link Map} which cannot be modified and supports efficient conversion to a {@link ModifiableMapPhase}.
18 * @param <K> the type of keys maintained by this map
19 * @param <V> the type of mapped values
22 public interface UnmodifiableMapPhase<K, V> extends Map<K, V>, Immutable {
24 * Return an isolated modifiable version of this map. Its mappings must match the mappings present in this map. Any
25 * modification of the returned map must not be affect the contents of this map.
27 * @return An modifiable version of this map.
29 @NonNull ModifiableMapPhase<K, V> toModifiableMap();