Record Class Amount
java.lang.Object
java.lang.Record
com.refinedmods.refinedstorage.api.autocrafting.calculation.Amount
-
Constructor Summary
ConstructorsConstructorDescriptionAmount
(long iterations, long amountPerIteration) Creates an instance of aAmount
record class. -
Method Summary
Modifier and TypeMethodDescriptionlong
Returns the value of theamountPerIteration
record component.final boolean
Indicates whether some other object is "equal to" this one.long
getTotal()
final int
hashCode()
Returns a hash code value for this object.long
Returns the value of theiterations
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
Amount
public Amount(long iterations, long amountPerIteration) Creates an instance of aAmount
record class.- Parameters:
iterations
- the value for theiterations
record componentamountPerIteration
- the value for theamountPerIteration
record component
-
-
Method Details
-
getTotal
public long getTotal() -
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 with '=='. -
iterations
public long iterations()Returns the value of theiterations
record component.- Returns:
- the value of the
iterations
record component
-
amountPerIteration
public long amountPerIteration()Returns the value of theamountPerIteration
record component.- Returns:
- the value of the
amountPerIteration
record component
-