mirror of
https://github.com/boy0001/FastAsyncWorldedit.git
synced 2025-01-19 14:51:34 +01:00
*
This commit is contained in:
parent
446dc9c568
commit
2448b2fe22
@ -1,6 +1,9 @@
|
|||||||
package com.boydti.fawe.object;
|
package com.boydti.fawe.object;
|
||||||
|
|
||||||
public abstract class RunnableVal<T> implements Runnable {
|
import java.util.function.Consumer;
|
||||||
|
import java.util.function.Supplier;
|
||||||
|
|
||||||
|
public abstract class RunnableVal<T> implements Runnable, Supplier<T>, Consumer<T> {
|
||||||
public T value;
|
public T value;
|
||||||
|
|
||||||
public RunnableVal() {
|
public RunnableVal() {
|
||||||
@ -21,4 +24,14 @@ public abstract class RunnableVal<T> implements Runnable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public abstract void run(T value);
|
public abstract void run(T value);
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public T get() {
|
||||||
|
return runAndGet();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void accept(T t) {
|
||||||
|
run(value);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user