Package com.illumon.util
Class SafeCloseableList
java.lang.Object
com.illumon.util.SafeCloseableList
- All Implemented Interfaces:
SafeCloseable
,AutoCloseable
public class SafeCloseableList extends Object implements SafeCloseable
SafeCloseable
that will close an internal list of other SafeCloseable
s.-
Constructor Summary
Constructors Constructor Description SafeCloseableList()
SafeCloseableList(SafeCloseable... entries)
SafeCloseableList(Collection<SafeCloseable> entries)
-
Method Summary
Modifier and Type Method Description <T extends SafeCloseable>
Tadd(T closeable)
void
addAll(List<SafeCloseable> closeableList)
<T extends SafeCloseable>
T[]addArray(T[] closeables)
void
clear()
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
-