7bbfb8828528a18e032c88e056273d4e46ee54d0
[yangtools.git] / yang / yang-data-api / src / main / java / org / opendaylight / yangtools / yang / data / api / AttributesContainer.java
1 /*
2  * Copyright (c) 2014 Cisco Systems, Inc. and others.  All rights reserved.
3  *
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
7  */
8 package org.opendaylight.yangtools.yang.data.api;
9
10 import java.util.Map;
11 import org.opendaylight.yangtools.yang.common.QName;
12
13 /**
14  *
15  * Container of attributes, which may be attached to nodes.
16  *
17  */
18 public interface AttributesContainer {
19
20     /**
21      * Returns immutable map of QName and value of the attribute.
22      *
23      * @return immutable map of attribute names and values.
24      */
25     Map<QName, String> getAttributes();
26
27     /**
28      * Returns attribute value by supplied QName
29      *
30      *
31      * @param name Attribute name
32      * @return Value of attribute if present, null otherwise.
33      */
34     Object getAttributeValue(QName name);
35
36 }