top.hendrixshen.magiclib.api.compat.AbstractCompat Maven / Gradle / Ivy
package top.hendrixshen.magiclib.api.compat;
import org.jetbrains.annotations.NotNull;
import top.hendrixshen.magiclib.util.collect.Provider;
import java.util.Objects;
public abstract class AbstractCompat implements Provider {
@NotNull
private final T type;
public AbstractCompat(@NotNull T type) {
Objects.requireNonNull(type, "Target couldn't be null");
this.type = type;
}
@Override
public @NotNull T get() {
return this.type;
}
@Override
public String toString() {
return this.getClass().getName() + "(" + this.get() + ")";
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy