Record Class HeartBarContextImpl
java.lang.Object
java.lang.Record
com.github.thedeathlycow.thermoo.impl.client.HeartBarContextImpl
- All Implemented Interfaces:
HeartBarContext
@Environment(CLIENT)
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
-
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. -
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
-