Record Class RestaurantsData.RestaurantData

java.lang.Object
java.lang.Record
petrolpark.mc.library.core.world.restaurant.RestaurantsData.RestaurantData
Enclosing class:
RestaurantsData

public static record RestaurantsData.RestaurantData(int ordersTaken, int ordersFulfilled, int xp, Optional<String> customName, List<IRestaurantOrder> menu) extends Record
  • Field Details

  • Constructor Details

    • RestaurantData

      public RestaurantData()
    • RestaurantData

      public RestaurantData(int ordersTaken, int ordersFulfilled, int xp, Optional<String> customName, List<IRestaurantOrder> menu)
      Creates an instance of a RestaurantData record class.
      Parameters:
      ordersTaken - the value for the ordersTaken record component
      ordersFulfilled - the value for the ordersFulfilled record component
      xp - the value for the xp record component
      customName - the value for the customName record component
      menu - the value for the menu record component
  • Method Details

    • mutable

    • 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 '=='.
      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.
    • ordersTaken

      public int ordersTaken()
      Returns the value of the ordersTaken record component.
      Returns:
      the value of the ordersTaken record component
    • ordersFulfilled

      public int ordersFulfilled()
      Returns the value of the ordersFulfilled record component.
      Returns:
      the value of the ordersFulfilled record component
    • xp

      public int xp()
      Returns the value of the xp record component.
      Returns:
      the value of the xp record component
    • customName

      public Optional<String> customName()
      Returns the value of the customName record component.
      Returns:
      the value of the customName record component