Record Class ArmorSet
java.lang.Object
java.lang.Record
info.u_team.u_team_core.item.armor.ArmorSet
- All Implemented Interfaces:
Iterable<RegistryEntry<? extends UArmorItem>>
public record ArmorSet(RegistryEntry<UHelmetItem> helmet, RegistryEntry<UChestplateItem> chestplate, RegistryEntry<ULeggingsItem> leggings, RegistryEntry<UBootsItem> boots)
extends Record
implements Iterable<RegistryEntry<? extends UArmorItem>>
-
Constructor Summary
ConstructorsConstructorDescriptionArmorSet(RegistryEntry<UHelmetItem> helmet, RegistryEntry<UChestplateItem> chestplate, RegistryEntry<ULeggingsItem> leggings, RegistryEntry<UBootsItem> boots) Creates an instance of aArmorSetrecord class. -
Method Summary
Modifier and TypeMethodDescriptionboots()Returns the value of thebootsrecord component.Returns the value of thechestplaterecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.helmet()Returns the value of thehelmetrecord component.Iterator<RegistryEntry<? extends UArmorItem>>iterator()leggings()Returns the value of theleggingsrecord component.final StringtoString()Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
ArmorSet
public ArmorSet(RegistryEntry<UHelmetItem> helmet, RegistryEntry<UChestplateItem> chestplate, RegistryEntry<ULeggingsItem> leggings, RegistryEntry<UBootsItem> boots) Creates an instance of aArmorSetrecord class.- Parameters:
helmet- the value for thehelmetrecord componentchestplate- the value for thechestplaterecord componentleggings- the value for theleggingsrecord componentboots- the value for thebootsrecord component
-
-
Method Details
-
iterator
- Specified by:
iteratorin interfaceIterable<RegistryEntry<? extends UArmorItem>>
-
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). -
helmet
Returns the value of thehelmetrecord component.- Returns:
- the value of the
helmetrecord component
-
chestplate
Returns the value of thechestplaterecord component.- Returns:
- the value of the
chestplaterecord component
-
leggings
Returns the value of theleggingsrecord component.- Returns:
- the value of the
leggingsrecord component
-
boots
Returns the value of thebootsrecord component.- Returns:
- the value of the
bootsrecord component
-