Implement managed transactions
[mdsal.git] / binding / mdsal-binding-util / src / main / java / org / opendaylight / mdsal / binding / util / CheckedConsumer.java
1 /*
2  * Copyright (c) 2017 Red Hat, 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 package org.opendaylight.mdsal.binding.util;
9
10 import java.util.function.Consumer;
11
12 /**
13  * {@link Consumer} which can throw a checked exception.
14  *
15  * @param <T> the type of the input to the operation
16  * @param <E> the type of the Exception to the operation
17  *
18  * @see Consumer
19  *
20  * @author Michael Vorburger.ch
21  */
22 @FunctionalInterface
23 public interface CheckedConsumer<T, E extends Exception> {
24
25     void accept(T input) throws E;
26
27 }