|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.crsh.util.CloseableList
public final class CloseableList
Field Summary | |
---|---|
private ArrayList<Closeable> |
closeables . |
private AtomicBoolean |
closed . |
(package private) Logger |
log . |
Constructor Summary | |
---|---|
CloseableList() |
Method Summary | |
---|---|
void |
add(Closeable closeable) Add a closeable to the list. |
void |
close() |
boolean |
isClosed() |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
final Logger log
private final ArrayList<Closeable> closeables
private final AtomicBoolean closed
Constructor Detail |
---|
public CloseableList()
Method Detail |
---|
public boolean isClosed()
public void add(Closeable closeable) throws IllegalStateException, NullPointerException
closeable
- the closeable to addIllegalStateException
- if the list is already closedNullPointerException
- if the argument is nullpublic void close()
close
in interface Closeable
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |