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;
12 import org.opendaylight.yangtools.yang.common.QName;
13 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.PathArgument;
14 import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode;
15 import org.opendaylight.yangtools.yang.data.impl.schema.builder.api.NormalizedNodeAttrBuilder;
17 abstract class AbstractImmutableNormalizedNodeBuilder<I extends PathArgument, V, R extends NormalizedNode<I, ?>>
18 implements NormalizedNodeAttrBuilder<I,V,R> {
20 private Map<QName, String> attributes = Collections.emptyMap();
21 private I nodeIdentifier;
24 protected final I getNodeIdentifier() {
25 return nodeIdentifier;
28 protected final V getValue() {
32 protected final Map<QName, String> getAttributes() {
37 public NormalizedNodeAttrBuilder<I,V,R> withValue(final V value) {
43 public NormalizedNodeAttrBuilder<I,V,R> withNodeIdentifier(final I nodeIdentifier) {
44 this.nodeIdentifier = nodeIdentifier;
49 public NormalizedNodeAttrBuilder<I,V,R> withAttributes(final Map<QName, String> attributes){
50 this.attributes = attributes;