Package dev.aurelium.slate.builder
Record Class BuiltComponent<T>
java.lang.Object
java.lang.Record
dev.aurelium.slate.builder.BuiltComponent<T>
public record BuiltComponent<T>(Class<T> contextType, Map<String,ComponentReplacer<T>> replacers, ComponentReplacer<T> anyReplacer, ComponentVisibility<T> visibility, ComponentInstances<T> instances)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionBuiltComponent(Class<T> contextType, Map<String, ComponentReplacer<T>> replacers, ComponentReplacer<T> anyReplacer, ComponentVisibility<T> visibility, ComponentInstances<T> instances) Creates an instance of aBuiltComponentrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theanyReplacerrecord component.applyReplacers(String input, Slate slate, org.bukkit.entity.Player player, ActiveMenu activeMenu, ComponentData componentData, T value) Returns the value of thecontextTyperecord component.static <T> BuiltComponent<T>createEmpty(Class<T> contextType) final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of theinstancesrecord component.Returns the value of thereplacersrecord component.final StringtoString()Returns a string representation of this record class.Returns the value of thevisibilityrecord component.
-
Constructor Details
-
BuiltComponent
public BuiltComponent(Class<T> contextType, Map<String, ComponentReplacer<T>> replacers, ComponentReplacer<T> anyReplacer, ComponentVisibility<T> visibility, ComponentInstances<T> instances) Creates an instance of aBuiltComponentrecord class.- Parameters:
contextType- the value for thecontextTyperecord componentreplacers- the value for thereplacersrecord componentanyReplacer- the value for theanyReplacerrecord componentvisibility- the value for thevisibilityrecord componentinstances- the value for theinstancesrecord component
-
-
Method Details
-
createEmpty
-
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
-
visibility
Returns the value of thevisibilityrecord component.- Returns:
- the value of the
visibilityrecord component
-
instances
Returns the value of theinstancesrecord component.- Returns:
- the value of the
instancesrecord component
-