com.github.bjoernpetersen.jmusicbot.provider.DependencyMap Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of musicbot Show documentation
Show all versions of musicbot Show documentation
Core library of MusicBot, which plays music from various providers.
package com.github.bjoernpetersen.jmusicbot.provider;
import com.github.bjoernpetersen.jmusicbot.Plugin;
import java.util.Map;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
public final class DependencyMap {
@Nonnull
private final Map, T> wrapped;
public DependencyMap(@Nonnull Map, T> wrapped) {
this.wrapped = wrapped;
}
@Nullable
public Base get(Class baseClass) {
return baseClass.cast(wrapped.get(baseClass));
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy