Package dev.aurelium.slate.builder
Record Class BuiltTemplate<T>
java.lang.Object
java.lang.Record
dev.aurelium.slate.builder.BuiltTemplate<T>
public record BuiltTemplate<T>(Class<T> contextType, Map<String,TemplateReplacer<T>> replacers, TemplateReplacer<T> anyReplacer, Map<ClickAction,TemplateClicker<T>> clickers, TemplateModifier<T> modifier, DefinedContexts<T> definedContexts, TemplateSlot<T> slotProvider, MenuListener initListener, ContextListener<T> contextListener)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionBuiltTemplate(Class<T> contextType, Map<String, TemplateReplacer<T>> replacers, TemplateReplacer<T> anyReplacer, Map<ClickAction, TemplateClicker<T>> clickers, TemplateModifier<T> modifier, DefinedContexts<T> definedContexts, TemplateSlot<T> slotProvider, MenuListener initListener, ContextListener<T> contextListener) Creates an instance of aBuiltTemplaterecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theanyReplacerrecord component.applyReplacers(String input, Slate slate, org.bukkit.entity.Player player, ActiveMenu activeMenu, PlaceholderType type, T value) clickers()Returns the value of theclickersrecord component.Returns the value of thecontextListenerrecord component.Returns the value of thecontextTyperecord component.static <T> BuiltTemplate<T>createEmpty(Class<T> contextType) Returns the value of thedefinedContextsrecord component.final booleanIndicates whether some other object is "equal to" this one.voidhandleClick(Set<ClickAction> actions, TemplateClick<T> templateClick) final inthashCode()Returns a hash code value for this object.Returns the value of theinitListenerrecord component.modifier()Returns the value of themodifierrecord component.Returns the value of thereplacersrecord component.Returns the value of theslotProviderrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
BuiltTemplate
public BuiltTemplate(Class<T> contextType, Map<String, TemplateReplacer<T>> replacers, TemplateReplacer<T> anyReplacer, Map<ClickAction, TemplateClicker<T>> clickers, TemplateModifier<T> modifier, DefinedContexts<T> definedContexts, TemplateSlot<T> slotProvider, MenuListener initListener, ContextListener<T> contextListener) Creates an instance of aBuiltTemplaterecord class.- Parameters:
contextType- the value for thecontextTyperecord componentreplacers- the value for thereplacersrecord componentanyReplacer- the value for theanyReplacerrecord componentclickers- the value for theclickersrecord componentmodifier- the value for themodifierrecord componentdefinedContexts- the value for thedefinedContextsrecord componentslotProvider- the value for theslotProviderrecord componentinitListener- the value for theinitListenerrecord componentcontextListener- the value for thecontextListenerrecord component
-
-
Method Details
-
createEmpty
-
handleClick
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
contextType
Returns the value of thecontextTyperecord component.- Returns:
- the value of the
contextTyperecord component
-
replacers
Returns the value of thereplacersrecord component.- Returns:
- the value of the
replacersrecord component
-
anyReplacer
Returns the value of theanyReplacerrecord component.- Returns:
- the value of the
anyReplacerrecord component
-
clickers
Returns the value of theclickersrecord component.- Returns:
- the value of the
clickersrecord component
-
modifier
Returns the value of themodifierrecord component.- Returns:
- the value of the
modifierrecord component
-
definedContexts
Returns the value of thedefinedContextsrecord component.- Returns:
- the value of the
definedContextsrecord component
-
slotProvider
Returns the value of theslotProviderrecord component.- Returns:
- the value of the
slotProviderrecord component
-
initListener
Returns the value of theinitListenerrecord component.- Returns:
- the value of the
initListenerrecord component
-
contextListener
Returns the value of thecontextListenerrecord component.- Returns:
- the value of the
contextListenerrecord component
-