org.aya.util.error.PosedConsumer Maven / Gradle / Ivy
// Copyright (c) 2020-2024 Tesla (Yinsen) Zhang.
// Use of this source code is governed by the MIT license that can be found in the LICENSE.md file.
package org.aya.util.error;
import org.jetbrains.annotations.NotNull;
import java.util.function.BiConsumer;
@FunctionalInterface
public interface PosedConsumer extends BiConsumer {
default void accept(@NotNull WithPos a) {
accept(a.sourcePos(), a.data());
}
default void forceAccept(T a) {
accept(SourcePos.NONE, a);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy