2 * Copyright (c) 2020 PANTHEON.tech, s.r.o. 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.mdsal.dom.api.query;
10 import static java.util.Objects.requireNonNull;
12 import com.google.common.annotations.Beta;
13 import com.google.common.collect.ImmutableList;
14 import java.util.List;
15 import org.eclipse.jdt.annotation.NonNull;
16 import org.opendaylight.yangtools.concepts.Immutable;
17 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
20 public final class DOMQuery implements Immutable {
21 private final @NonNull YangInstanceIdentifier root;
22 // Note: relative to root
23 private final @NonNull YangInstanceIdentifier select;
24 private final @NonNull ImmutableList<DOMQueryPredicate> predicates;
26 public DOMQuery(final YangInstanceIdentifier root, final YangInstanceIdentifier select,
27 final List<? extends DOMQueryPredicate> predicates) {
28 this.root = requireNonNull(root);
29 this.select = requireNonNull(select);
30 this.predicates = ImmutableList.copyOf(predicates);
33 public @NonNull YangInstanceIdentifier getRoot() {
37 public @NonNull YangInstanceIdentifier getSelect() {
41 public @NonNull List<? extends DOMQueryPredicate> getPredicates() {