2 * Copyright (c) 2013 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.controller.sal.binding.impl;
10 import java.util.ArrayList;
11 import java.util.List;
14 public class BrokerUtils {
15 private BrokerUtils() {
20 public static <K,V> void addToMap(Map<Class<? extends K>, List<V>> map, Class<? extends K> key, V value) {
21 List<V> list = map.get(key);
23 list = new ArrayList<V>();
29 public static <K,V> void removeFromMap(Map<Class<? extends K>, List<V>> map, Class<? extends K> key,
31 List<V> list = map.get(key);