19 lines
456 B
Java
19 lines
456 B
Java
package org.warp.commonutils.concurrency.executor;
|
|
|
|
import java.util.Objects;
|
|
import java.util.concurrent.Executor;
|
|
import org.jetbrains.annotations.NotNull;
|
|
|
|
public abstract class ExecutorDecorator implements Executor {
|
|
private final Executor executor;
|
|
|
|
public ExecutorDecorator(Executor executor) {
|
|
this.executor = Objects.requireNonNull(executor);
|
|
}
|
|
|
|
@Override
|
|
public void execute(@NotNull Runnable runnable) {
|
|
executor.execute(runnable);
|
|
}
|
|
}
|