Replace Preconditions.CheckNotNull per RequireNonNull
[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 static java.util.Objects.requireNonNull;
11
12 import org.opendaylight.yangtools.yang.binding.DataObject;
13 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
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 = requireNonNull(instanceIdentifier);
23     }
24
25     @Override
26     public final InstanceIdentifier<T> getInstanceIdentifier() {
27         return this.instanceIdentifier;
28     }
29 }