1 package org.opendaylight.controller.sal.binding.impl.util
3 import java.util.Map.Entry
4 import org.opendaylight.yangtools.concepts.Path
7 import java.util.Collection
8 import java.util.HashSet
9 import com.google.common.collect.Multimap
13 public static def <P extends Path<P>, V> Collection<Entry<? extends P, ? extends V>> getAllChildren(
14 Multimap<? extends P, ? extends V> map, P path) {
15 val ret = new HashSet();
16 val entries = map.entries;
18 for (entry : entries) {
19 val currentPath = entry.key;
20 // If the registered reader processes nested elements
21 if (path.contains(currentPath)) {
23 } else if(currentPath.contains(path)) {
24 // If the registered reader is parent of entry