io.github.parzivalExe.guiApi.antlr.elements.Library.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of guiapi-mc1.8 Show documentation
Show all versions of guiapi-mc1.8 Show documentation
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
}