Bug 615: Removed xtend from Topology Manager
[controller.git] / opendaylight / sal / yang-prototype / concepts-lang / src / main / java / org / opendaylight / controller / concepts / lang / SimpleConditionalTransformer.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
9 package org.opendaylight.controller.concepts.lang;
10 /**
11  * Simple condition-based transformer
12  *
13  * The transformer provides {@link #isAcceptable(Object)} method,
14  * which could be used to query transformer if the input will produce
15  * result.
16  *
17  * This interface is simplified version of {@link RuleBasedTransformer} - does not
18  * provide decoupling of Acceptance rule from transformer, and should be used only
19  * for simple use-cases.
20  *
21  * @author Tony Tkacik
22  *
23  * @param <I> Input class for transformation
24  * @param <P> Product of transformation
25  */
26 public interface SimpleConditionalTransformer<I,P> extends Transformer<I, P>, Acceptor<I> {
27
28
29     /**
30      * Checks if the input is acceptable
31      * for processing by the transformer.
32      *
33      * @return true it the input is acceptable for processing by transformer.
34      */
35     @Override
36     public boolean isAcceptable(I input);
37 }