mirror of
https://github.com/elisspace/autopsy.git
synced 2026-10-05 08:46:20 +00:00
use private verions of CheckedFunction
This commit is contained in:
@@ -673,9 +673,22 @@ public final class FilteredEventsModel {
|
||||
*/
|
||||
private static class CacheLoaderImpl<K, V> extends CacheLoader<K, V> {
|
||||
|
||||
private final EventType.CheckedFunction<K, V> func;
|
||||
/**
|
||||
* Functinal interface for a function from I to O that throws an
|
||||
* Exception.
|
||||
*
|
||||
* @param <I> Input type.
|
||||
* @param <O> Output type.
|
||||
*/
|
||||
@FunctionalInterface
|
||||
interface CheckedFunction<I, O> {
|
||||
|
||||
CacheLoaderImpl(EventType.CheckedFunction<K, V> func) {
|
||||
O apply(I input) throws Exception;
|
||||
}
|
||||
|
||||
private final CheckedFunction<K, V> func;
|
||||
|
||||
CacheLoaderImpl(CheckedFunction<K, V> func) {
|
||||
this.func = func;
|
||||
}
|
||||
|
||||
@@ -696,4 +709,5 @@ public final class FilteredEventsModel {
|
||||
private CacheInvalidatedEvent() {
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user