Record Class ConnectedBlock
java.lang.Object
java.lang.Record
dev.latvian.mods.klib.block.ConnectedBlock
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionConnectedBlock(PositionedBlock block, int distance) Creates an instance of aConnectedBlockrecord class. -
Method Summary
Modifier and TypeMethodDescriptionblock()Returns the value of theblockrecord component.intdistance()Returns the value of thedistancerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ConnectedBlock
Creates an instance of aConnectedBlockrecord class.- Parameters:
block- the value for theblockrecord componentdistance- the value for thedistancerecord 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. -
block
Returns the value of theblockrecord component.- Returns:
- the value of the
blockrecord component
-
distance
public int distance()Returns the value of thedistancerecord component.- Returns:
- the value of the
distancerecord component
-