Record Class BuiltInResources.Built

java.lang.Object
java.lang.Record
fr.robie.machineengine.api.resource.BuiltInResources.Built
Enclosing class:
BuiltInResources

public static record BuiltInResources.Built(@NotNull ResourceCategory energyCategory, @NotNull ResourceType energy, @NotNull ResourceCategory fluidCategory, @NotNull ResourceType water, @NotNull ResourceType lava, long bucket) extends Record
The resources, units, scales and bucket size built from config.
  • Constructor Details

    • Built

      public Built(@NotNull @NotNull ResourceCategory energyCategory, @NotNull @NotNull ResourceType energy, @NotNull @NotNull ResourceCategory fluidCategory, @NotNull @NotNull ResourceType water, @NotNull @NotNull ResourceType lava, long bucket)
      Creates an instance of a Built record class.
      Parameters:
      energyCategory - the value for the energyCategory record component
      energy - the value for the energy record component
      fluidCategory - the value for the fluidCategory record component
      water - the value for the water record component
      lava - the value for the lava record component
      bucket - the value for the bucket record component
  • Method Details

    • 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.
    • energyCategory

      @NotNull public @NotNull ResourceCategory energyCategory()
      Returns the value of the energyCategory record component.
      Returns:
      the value of the energyCategory record component
    • energy

      @NotNull public @NotNull ResourceType energy()
      Returns the value of the energy record component.
      Returns:
      the value of the energy record component
    • fluidCategory

      @NotNull public @NotNull ResourceCategory fluidCategory()
      Returns the value of the fluidCategory record component.
      Returns:
      the value of the fluidCategory record component
    • water

      @NotNull public @NotNull ResourceType water()
      Returns the value of the water record component.
      Returns:
      the value of the water record component
    • lava

      @NotNull public @NotNull ResourceType lava()
      Returns the value of the lava record component.
      Returns:
      the value of the lava record component
    • bucket

      public long bucket()
      Returns the value of the bucket record component.
      Returns:
      the value of the bucket record component