Populate data/ hierarchy
[yangtools.git] / model / openconfig-model-api / src / main / java / org / opendaylight / yangtools / openconfig / model / api / OpenConfigHashedValueSchemaNode.java
1 /*
2  * Copyright (c) 2017 Pantheon Technologies, s.r.o. 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.openconfig.model.api;
9
10 import com.google.common.annotations.Beta;
11 import org.opendaylight.yangtools.yang.model.api.SchemaNode;
12 import org.opendaylight.yangtools.yang.model.api.UnknownSchemaNode;
13
14 /**
15  * SchemaNode presence in SchemaNode API space.
16  *
17  * @author Robert Varga
18  */
19 @Beta
20 public interface OpenConfigHashedValueSchemaNode extends UnknownSchemaNode {
21     /**
22      * Determine if specified SchemaNode is marked to report its value in hashed form.
23      *
24      * @param schemaNode schema node to examine
25      * @return True if specified node is marked, false otherwise
26      * @throws NullPointerException if schemaNode is null
27      */
28     static boolean isPresentIn(final SchemaNode schemaNode) {
29         return schemaNode.getUnknownSchemaNodes().stream().anyMatch(OpenConfigHashedValueSchemaNode.class::isInstance);
30     }
31
32     @Override
33     OpenConfigHashedValueEffectiveStatement asEffectiveStatement();
34 }