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 SafeCloseables.-
Constructor Summary
ConstructorsConstructorDescriptionSafeCloseableList(SafeCloseable... entries) SafeCloseableList(Collection<SafeCloseable> entries) -
Method Summary
Modifier and TypeMethodDescriptionfinal <T extends SafeCloseable>
Tadd(T closeable) final voidaddAll(List<SafeCloseable> closeableList) final <T extends SafeCloseable>
T[]addArray(T[] closeables) final voidclear()final voidclose()
-
Constructor Details
-
SafeCloseableList
public SafeCloseableList() -
SafeCloseableList
-
SafeCloseableList
-
-
Method Details
-
addAll
-
addArray
-
add
-
clear
public final void clear() -
close
public final void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceSafeCloseable
-