All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.github.parzivalExe.guiApi.antlr.elements.Library.kt Maven / Gradle / Ivy

Go to download

With GuiAPI you can create Guis for your Bukkit/Spigot-Plugin in seconds while at the same time saving many lines of code

The newest version!
package io.github.parzivalExe.guiApi.antlr.elements

@Suppress("unused")
class Library(private val inclusions: ArrayList) {

    fun getClassForSynonym(synonym: String): Class<*>? =
        inclusions.firstOrNull { include -> include.synonym == synonym }?.clazz
    fun containsSynonym(synonym: String): Boolean =
        inclusions.any { include -> include.synonym == synonym }

    fun containsSynonymForClass(clazz: Class<*>): Boolean =
        inclusions.any { include -> include.clazz == clazz }
    fun getSynonymForClass(clazz: Class<*>): String? =
        inclusions.firstOrNull { include -> include.clazz == clazz }?.synonym

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy