*/
package org.opendaylight.yangtools.yang.data.impl.schema.nodes;
+import java.util.Collections;
import java.util.Map;
import org.opendaylight.yangtools.concepts.Immutable;
protected final Map<PathArgument, DataContainerChild<? extends PathArgument, ?>> children;
-
public AbstractImmutableDataContainerNode(
final Map<PathArgument, DataContainerChild<? extends PathArgument, ?>> children, final K nodeIdentifier) {
super(nodeIdentifier, Iterables.unmodifiableIterable(children.values()));
return children.hashCode();
}
+ public final Map<PathArgument, DataContainerChild<? extends PathArgument, ?>> getChildren() {
+ // Make sure we do not leak a mutable view
+ return Collections.unmodifiableMap(children);
+ }
+
@Override
protected boolean valueEquals(final AbstractImmutableNormalizedNode<?, ?> other) {
if (!(other instanceof AbstractImmutableDataContainerNode<?>)) {