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.builder.impl;
10 import java.util.Collections;
13 import org.opendaylight.yangtools.yang.common.QName;
14 import org.opendaylight.yangtools.yang.data.api.InstanceIdentifier;
15 import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode;
16 import org.opendaylight.yangtools.yang.data.impl.schema.builder.api.NormalizedNodeAttrBuilder;
18 abstract class AbstractImmutableNormalizedNodeBuilder<I extends InstanceIdentifier.PathArgument, V, R extends NormalizedNode<I, ?>>
19 implements NormalizedNodeAttrBuilder<I,V,R> {
21 private Map<QName, String> attributes = Collections.emptyMap();
22 private I nodeIdentifier;
25 protected final I getNodeIdentifier() {
26 return nodeIdentifier;
29 protected final V getValue() {
33 protected final Map<QName, String> getAttributes() {
38 public NormalizedNodeAttrBuilder<I,V,R> withValue(final V value) {
44 public NormalizedNodeAttrBuilder<I,V,R> withNodeIdentifier(final I nodeIdentifier) {
45 this.nodeIdentifier = nodeIdentifier;
50 public NormalizedNodeAttrBuilder<I,V,R> withAttributes(final Map<QName, String> attributes){
51 this.attributes = attributes;