org.conqat.lib.commons.lang.SilentAutoClosable Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of teamscale-lib-commons Show documentation
Show all versions of teamscale-lib-commons Show documentation
Provides common utility functions
package org.conqat.lib.commons.lang;
/**
* Special kind of {@link AutoCloseable}, where no (checked) Exception is thrown.
*/
public interface SilentAutoClosable extends AutoCloseable {
@Override
void close();
/**
* @return A no-op {@link SilentAutoClosable}.
*/
static SilentAutoClosable empty() {
return () -> {
};
}
}