Package com.illumon.util
Class SafeCloseableList
java.lang.Object
com.illumon.util.SafeCloseableList
- All Implemented Interfaces:
SafeCloseable
,AutoCloseable
SafeCloseable
that will close an internal list of other SafeCloseable
s.-
Constructor Summary
ConstructorsConstructorDescriptionSafeCloseableList
(SafeCloseable... entries) SafeCloseableList
(Collection<SafeCloseable> entries) -
Method Summary
Modifier and TypeMethodDescriptionfinal <T extends SafeCloseable>
Tadd
(T closeable) final void
addAll
(List<SafeCloseable> closeableList) final <T extends SafeCloseable>
T[]addArray
(T[] closeables) final void
clear()
final void
close()
-
Constructor Details
-
SafeCloseableList
public SafeCloseableList() -
SafeCloseableList
-
SafeCloseableList
-
-
Method Details
-
addAll
-
addArray
-
add
-
clear
public final void clear() -
close
public final void close()- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceSafeCloseable
-