Add missing license headers
[controller.git] / opendaylight / config / yang-test / src / main / java / org / opendaylight / controller / config / yang / test / impl / CheckedAutoCloseable.java
1
2
3
4 package org.opendaylight.controller.config.yang.test.impl;
5
6 import com.google.common.base.Preconditions;
7
8 public class CheckedAutoCloseable implements AutoCloseable {
9     private boolean closed = false;
10
11     @Override
12     public synchronized void close() throws Exception {
13         Preconditions.checkState(closed == false);
14         this.closed = true;
15     }
16
17     public synchronized boolean isClosed() {
18         return this.closed;
19     }
20 }

©2013 OpenDaylight, A Linux Foundation Collaborative Project. All Rights Reserved.
OpenDaylight is a registered trademark of The OpenDaylight Project, Inc.
Linux Foundation and OpenDaylight are registered trademarks of the Linux Foundation.
Linux is a registered trademark of Linus Torvalds.