2 * Copyright (c) 2014 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
9 package org.opendaylight.controller.sal.binding.impl.util;
11 import com.google.common.collect.Multimap;
12 import java.util.Collection;
13 import java.util.HashSet;
14 import java.util.Map.Entry;
15 import org.opendaylight.yangtools.concepts.Path;
17 @SuppressWarnings("all")
18 public class MapUtils {
19 public static <P extends Path<P>, V extends Object> Collection<Entry<? extends P,? extends V>> getAllChildren(final Multimap<? extends P,? extends V> map, final P path) {
20 HashSet<Entry<? extends P,? extends V>> _hashSet = new HashSet<Entry<? extends P, ? extends V>>();
21 final HashSet<Entry<? extends P,? extends V>> ret = _hashSet;
22 final Collection<? extends Entry<? extends P,? extends V>> entries = map.entries();
23 for (final Entry<? extends P,? extends V> entry : entries) {
25 final P currentPath = entry.getKey();
26 if (path.contains(currentPath)) {
28 } else if (currentPath.contains(path)){