public static interface TLcdLockUtil.Lock extends Closeable
Closeable
that unlocks an object in its close()
method.
Use this with the Java 1.7 try-with-resource idiom (see example
).
You must never implement this interface yourself, and only use it using try-with-resources.
In the future, this interface may be changed to extend AutoCloseable
instead of Closeable
.
Modifier and Type | Method and Description |
---|---|
void |
close()
Unlocks (read or write) the object it is associated with.
|
void close()
example
).close
in interface AutoCloseable
close
in interface Closeable