top.hendrixshen.magiclib.api.compat.AbstractCompat Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of magiclib-minecraft-api-1.19.3-fabric Show documentation
Show all versions of magiclib-minecraft-api-1.19.3-fabric Show documentation
Unleash magic into Minecraft, infuse souls, ascend to heaven!
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