Record Class ItemLayout

java.lang.Object
java.lang.Record
eu.cloudnetservice.modules.npc.configuration.ItemLayout

public record ItemLayout(@NonNull String material, int subId, @NonNull String displayName, @NonNull List<String> lore) extends Record
  • Field Details

    • material

      @NonNull private final @NonNull String material
      The field for the material record component.
    • subId

      private final int subId
      The field for the subId record component.
    • displayName

      @NonNull private final @NonNull String displayName
      The field for the displayName record component.
    • lore

      @NonNull private final @NonNull List<String> lore
      The field for the lore record component.
  • Constructor Details

    • ItemLayout

      public ItemLayout(@NonNull @NonNull String material, int subId, @NonNull @NonNull String displayName, @NonNull @NonNull List<String> lore)
      Creates an instance of a ItemLayout record class.
      Parameters:
      material - the value for the material record component
      subId - the value for the subId record component
      displayName - the value for the displayName record component
      lore - the value for the lore record component
  • Method Details

    • builder

      @NonNull public static @NonNull ItemLayout.Builder builder()
    • builder

    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • material

      @NonNull public @NonNull String material()
      Returns the value of the material record component.
      Returns:
      the value of the material record component
    • subId

      public int subId()
      Returns the value of the subId record component.
      Returns:
      the value of the subId record component
    • displayName

      @NonNull public @NonNull String displayName()
      Returns the value of the displayName record component.
      Returns:
      the value of the displayName record component
    • lore

      @NonNull public @NonNull List<String> lore()
      Returns the value of the lore record component.
      Returns:
      the value of the lore record component