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 Summary
ConstructorsConstructorDescriptionBuilt(@NotNull ResourceCategory energyCategory, @NotNull ResourceType energy, @NotNull ResourceCategory fluidCategory, @NotNull ResourceType water, @NotNull ResourceType lava, long bucket) Creates an instance of aBuiltrecord class. -
Method Summary
Modifier and TypeMethodDescriptionlongbucket()Returns the value of thebucketrecord component.@NotNull ResourceTypeenergy()Returns the value of theenergyrecord component.@NotNull ResourceCategoryReturns the value of theenergyCategoryrecord component.final booleanIndicates whether some other object is "equal to" this one.@NotNull ResourceCategoryReturns the value of thefluidCategoryrecord component.final inthashCode()Returns a hash code value for this object.@NotNull ResourceTypelava()Returns the value of thelavarecord component.final StringtoString()Returns a string representation of this record class.@NotNull ResourceTypewater()Returns the value of thewaterrecord component.
-
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 aBuiltrecord class.- Parameters:
energyCategory- the value for theenergyCategoryrecord componentenergy- the value for theenergyrecord componentfluidCategory- the value for thefluidCategoryrecord componentwater- the value for thewaterrecord componentlava- the value for thelavarecord componentbucket- the value for thebucketrecord component
-
-
Method Details
-
toString
-
hashCode
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
energyCategory
Returns the value of theenergyCategoryrecord component.- Returns:
- the value of the
energyCategoryrecord component
-
energy
Returns the value of theenergyrecord component.- Returns:
- the value of the
energyrecord component
-
fluidCategory
Returns the value of thefluidCategoryrecord component.- Returns:
- the value of the
fluidCategoryrecord component
-
water
Returns the value of thewaterrecord component.- Returns:
- the value of the
waterrecord component
-
lava
Returns the value of thelavarecord component.- Returns:
- the value of the
lavarecord component
-
bucket
public long bucket()Returns the value of thebucketrecord component.- Returns:
- the value of the
bucketrecord component
-