Package dev.aurelium.slate.item
Record Class TemplateVariant<C>
java.lang.Object
java.lang.Record
dev.aurelium.slate.item.TemplateVariant<C>
-
Constructor Summary
ConstructorsConstructorDescriptionTemplateVariant(@NonNull Set<C> contextFilters, @NonNull Map<String, Object> propertyFilters, @Nullable org.bukkit.inventory.ItemStack baseItem, @Nullable PositionProvider position, @Nullable String displayName, @NonNull List<LoreLine> lore) Creates an instance of aTemplateVariantrecord class. -
Method Summary
Modifier and TypeMethodDescription@Nullable org.bukkit.inventory.ItemStackbaseItem()Returns the value of thebaseItemrecord component.Returns the value of thecontextFiltersrecord component.@Nullable StringReturns the value of thedisplayNamerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.lore()Returns the value of thelorerecord component.@Nullable PositionProviderposition()Returns the value of thepositionrecord component.Returns the value of thepropertyFiltersrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
TemplateVariant
public TemplateVariant(@NonNull Set<C> contextFilters, @NonNull Map<String, Object> propertyFilters, @Nullable org.bukkit.inventory.ItemStack baseItem, @Nullable PositionProvider position, @Nullable String displayName, @NonNull List<LoreLine> lore) Creates an instance of aTemplateVariantrecord class.- Parameters:
contextFilters- the value for thecontextFiltersrecord componentpropertyFilters- the value for thepropertyFiltersrecord componentbaseItem- the value for thebaseItemrecord componentposition- the value for thepositionrecord componentdisplayName- the value for thedisplayNamerecord componentlore- the value for thelorerecord component
-
-
Method Details
-
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). -
contextFilters
Returns the value of thecontextFiltersrecord component.- Returns:
- the value of the
contextFiltersrecord component
-
propertyFilters
Returns the value of thepropertyFiltersrecord component.- Returns:
- the value of the
propertyFiltersrecord component
-
baseItem
public @Nullable org.bukkit.inventory.ItemStack baseItem()Returns the value of thebaseItemrecord component.- Returns:
- the value of the
baseItemrecord component
-
position
Returns the value of thepositionrecord component.- Returns:
- the value of the
positionrecord component
-
displayName
Returns the value of thedisplayNamerecord component.- Returns:
- the value of the
displayNamerecord component
-
lore
Returns the value of thelorerecord component.- Returns:
- the value of the
lorerecord component
-