2 * Copyright (c) 2016 Red Hat, 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.netvirt.aclservice.tests.infra;
10 import org.eclipse.xtext.xbase.lib.Pair;
11 import org.opendaylight.controller.md.sal.binding.api.DataTreeIdentifier;
12 import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
13 import org.opendaylight.yangtools.concepts.Builder;
14 import org.opendaylight.yangtools.yang.binding.DataObject;
15 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
18 * Builder of an {@link DataTreeIdentifier} -> {@link DataObject} Pair.
20 * @param <T> DataObject type
22 * @author Michael Vorburger
24 public interface DataTreeIdentifierDataObjectPairBuilder<T extends DataObject>
25 extends Builder<Pair<DataTreeIdentifier<T>, T>> {
27 // TODO use, when merged, pending https://git.opendaylight.org/gerrit/#/c/46479/
29 LogicalDatastoreType type();
31 InstanceIdentifier<T> identifier();
36 default Pair<DataTreeIdentifier<T>, T> build() {
37 return Pair.of(new DataTreeIdentifier<>(type(), identifier()), dataObject());