2 * Copyright (c) 2013 Cisco Systems, 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
9 package org.opendaylight.controller.concepts.transform;
12 * Simple condition-based transformer
14 * The transformer provides {@link #isAcceptable(Object)} method,
15 * which could be used to query transformer if the input will produce
18 * This interface is simplified version of {@link RuleBasedTransformer} - does not
19 * provide decoupling of Acceptance rule from transformer, and should be used only
20 * for simple use-cases.
24 * @param <I> Input class for transformation
25 * @param <P> Product of transformation
27 public interface SimpleConditionalTransformer<I,P> extends Transformer<I, P>, Acceptor<I> {
31 * Checks if the input is acceptable
32 * for processing by the transformer.
34 * @return true it the input is acceptable for processing by transformer.
37 public boolean isAcceptable(I input);