Record Class HeartBarContextImpl
java.lang.Object
java.lang.Record
com.github.thedeathlycow.thermoo.impl.client.HeartBarContextImpl
- All Implemented Interfaces:
HeartBarContext
public record HeartBarContextImpl(SequencedCollection<org.joml.Vector2i> positions, int currentDisplayHalfHearts, int maxDisplayHalfHearts)
extends Record
implements HeartBarContext
-
Constructor Summary
ConstructorsConstructorDescriptionHeartBarContextImpl(SequencedCollection<org.joml.Vector2i> positions, int currentDisplayHalfHearts, int maxDisplayHalfHearts) Creates an instance of aHeartBarContextImplrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the value of thecurrentDisplayHalfHeartsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intReturns the value of themaxDisplayHalfHeartsrecord component.SequencedCollection<org.joml.Vector2i> Returns the value of thepositionsrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
HeartBarContextImpl
public HeartBarContextImpl(SequencedCollection<org.joml.Vector2i> positions, int currentDisplayHalfHearts, int maxDisplayHalfHearts) Creates an instance of aHeartBarContextImplrecord class.- Parameters:
positions- the value for thepositionsrecord componentcurrentDisplayHalfHearts- the value for thecurrentDisplayHalfHeartsrecord componentmaxDisplayHalfHearts- the value for themaxDisplayHalfHeartsrecord component
-
-
Method Details
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
positions
Returns the value of thepositionsrecord component.- Specified by:
positionsin interfaceHeartBarContext- Returns:
- the value of the
positionsrecord component
-
currentDisplayHalfHearts
public int currentDisplayHalfHearts()Returns the value of thecurrentDisplayHalfHeartsrecord component.- Specified by:
currentDisplayHalfHeartsin interfaceHeartBarContext- Returns:
- the value of the
currentDisplayHalfHeartsrecord component
-
maxDisplayHalfHearts
public int maxDisplayHalfHearts()Returns the value of themaxDisplayHalfHeartsrecord component.- Specified by:
maxDisplayHalfHeartsin interfaceHeartBarContext- Returns:
- the value of the
maxDisplayHalfHeartsrecord component
-