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.yangtools.yang.data.impl.schema.nodes;
10 import java.util.Objects;
11 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.PathArgument;
12 import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode;
14 public abstract class AbstractImmutableNormalizedSimpleValueNode<K extends PathArgument, N extends NormalizedNode, V>
15 extends AbstractImmutableNormalizedValueNode<K, N, V> {
16 protected AbstractImmutableNormalizedSimpleValueNode(final K nodeIdentifier, final V value) {
17 super(nodeIdentifier, value);
21 protected final int valueHashCode() {
22 return value().hashCode();
26 protected final boolean valueEquals(final N other) {
27 // We can not call directly body().equals because of Empty Type
28 // RequireInstanceStatementSupport leaves which always have NULL value
29 return Objects.deepEquals(value(), other.body());