Spaces:
Build error
Build error
File size: 604 Bytes
d46f4a3 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
package net.minecraft.util;
import java.util.function.Consumer;
@FunctionalInterface
public interface AbortableIterationConsumer<T> {
AbortableIterationConsumer.Continuation accept(T p_261708_);
static <T> AbortableIterationConsumer<T> forConsumer(Consumer<T> p_261477_) {
return p_261916_ -> {
p_261477_.accept(p_261916_);
return AbortableIterationConsumer.Continuation.CONTINUE;
};
}
public static enum Continuation {
CONTINUE,
ABORT;
public boolean shouldAbort() {
return this == ABORT;
}
}
} |