/* * Copyright (c) 2015 Cisco Systems, Inc. and others. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 which accompanies this distribution, * and is available at http://www.eclipse.org/legal/epl-v10.html */ package org.opendaylight.yangtools.yang.model.api.meta; import java.util.Collection; import java.util.Map; import javax.annotation.Nonnull; import javax.annotation.Nullable; /** * Effective model statement which should be used to derive application behaviour. * * @param * Argument type ({@link Void} if statement does not have argument.) * @param * Class representing declared version of this statement. */ public interface EffectiveStatement> extends ModelStatement { /** * Returns statement, which was explicit declaration of this effective * statement. * * * @return statement, which was explicit declaration of this effective * statement or null if statement was inferred from context. */ @Nullable S getDeclared(); /** * * Returns value associated with supplied identifier * * @param * Identifier type * @param * Value type * @param * Namespace identifier type * @param namespace * Namespace type * @param identifier * Identifier of element. * @return Value if present, null otherwise. * * */ //> V @Nullable public > V get(@Nonnull Class namespace,@Nonnull K identifier); /** * * Returns all local values from supplied namespace. * * @param * Identifier type * @param * Value type * @param * Namespace identifier type * @param namespace * Namespace type * @return Value if present, null otherwise. */ @Nullable > Map getAll(@Nonnull Class namespace); /** * * Returns iteration of all effective substatements. * * @return iteration of all effective substatements. */ Collection> effectiveSubstatements(); }