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.yang.parser.spi.source;
10 import org.opendaylight.yangtools.yang.common.QNameModule;
12 import javax.annotation.Nullable;
13 import java.util.HashMap;
16 public class PrefixToModuleMap implements PrefixToModule {
18 private Map<String, QNameModule> prefixToModuleMap = new HashMap<>();
20 public void put(String prefix, QNameModule qNameModule) {
21 prefixToModuleMap.put(prefix, qNameModule);
26 public QNameModule get(String prefix) {
27 return prefixToModuleMap.get(prefix);
32 public QNameModule getByNamespace(String namespace) {