Add configuration for extensions
[bgpcep.git] / concepts / src / main / java / org / opendaylight / protocol / concepts / DefaultInstanceReference.java
1 /*
2  * Copyright (c) 2013 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.protocol.concepts;
9
10 import org.opendaylight.yangtools.yang.binding.DataObject;
11 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
12
13 import com.google.common.base.Preconditions;
14
15 /**
16  *
17  */
18 public class DefaultInstanceReference<T extends DataObject> implements InstanceReference<T> {
19         private final InstanceIdentifier<T> instanceIdentifier;
20
21         public DefaultInstanceReference(final InstanceIdentifier<T> instanceIdentifier) {
22                 this.instanceIdentifier = Preconditions.checkNotNull(instanceIdentifier);
23         }
24
25         @Override
26         public final InstanceIdentifier<T> getInstanceIdentifier() {
27                 return instanceIdentifier;
28         }
29 }