Package studio.mevera.lotus.api.button
Record Class TransformingButton
java.lang.Object
java.lang.Record
studio.mevera.lotus.api.button.TransformingButton
- All Implemented Interfaces:
Button
public record TransformingButton(@NotNull org.bukkit.inventory.ItemStack item, @NotNull BiFunction<MenuView<?,?>,org.bukkit.event.inventory.InventoryClickEvent,Button> transformer, @NotNull DataRegistry data)
extends Record
implements Button
-
Constructor Summary
ConstructorsConstructorDescriptionTransformingButton(@NotNull org.bukkit.inventory.ItemStack item, @NotNull BiFunction<MenuView<?, ?>, org.bukkit.event.inventory.InventoryClickEvent, Button> transformer, @NotNull DataRegistry data) Creates an instance of aTransformingButtonrecord class. -
Method Summary
Modifier and TypeMethodDescription@NotNull DataRegistrydata()Returns the value of thedatarecord component.voiddispatch(@NotNull MenuView<?, ?> view, @NotNull org.bukkit.event.inventory.InventoryClickEvent event) final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.@NotNull org.bukkit.inventory.ItemStackitem()Returns the value of theitemrecord component.final StringtoString()Returns a string representation of this record class.@NotNull BiFunction<MenuView<?, ?>, org.bukkit.event.inventory.InventoryClickEvent, Button> Returns the value of thetransformerrecord component.@NotNull TransformingButtonwithItem(@NotNull org.bukkit.inventory.ItemStack item)
-
Constructor Details
-
TransformingButton
public TransformingButton(@NotNull @NotNull org.bukkit.inventory.ItemStack item, @NotNull @NotNull BiFunction<MenuView<?, ?>, org.bukkit.event.inventory.InventoryClickEvent, Button> transformer, @NotNull @NotNull DataRegistry data) Creates an instance of aTransformingButtonrecord class.- Parameters:
item- the value for theitemrecord componenttransformer- the value for thetransformerrecord componentdata- the value for thedatarecord component
-
-
Method Details
-
withItem
@NotNull public @NotNull TransformingButton withItem(@NotNull @NotNull org.bukkit.inventory.ItemStack item) -
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). -
item
@NotNull public @NotNull org.bukkit.inventory.ItemStack item()Returns the value of theitemrecord component. -
transformer
@NotNull public @NotNull BiFunction<MenuView<?,?>, transformer()org.bukkit.event.inventory.InventoryClickEvent, Button> Returns the value of thetransformerrecord component.- Returns:
- the value of the
transformerrecord component
-
data
Returns the value of thedatarecord component.
-