Package com.takenoko.layers.irrigation
Record Class IrrigationChannelPosition
java.lang.Object
java.lang.Record
com.takenoko.layers.irrigation.IrrigationChannelPosition
- Record Components:
leftTilePosition- the position of the tile on the left of the irrigation channelrightTilePosition- the position of the tile on the right of the irrigation channel
public record IrrigationChannelPosition(@NotNull PositionVector leftTilePosition, @NotNull PositionVector rightTilePosition)
extends Record
This record represents an irrigation channel Position
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final @NotNull PositionVectorThe field for theleftTilePositionrecord component.private final @NotNull PositionVectorThe field for therightTilePositionrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionIrrigationChannelPosition(@NotNull PositionVector leftTilePosition, @NotNull PositionVector rightTilePosition) Creates an instance of aIrrigationChannelPositionrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.@NotNull PositionVectorReturns the value of theleftTilePositionrecord component.@NotNull PositionVectorReturns the value of therightTilePositionrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
leftTilePosition
The field for theleftTilePositionrecord component. -
rightTilePosition
The field for therightTilePositionrecord component.
-
-
Constructor Details
-
IrrigationChannelPosition
public IrrigationChannelPosition(@NotNull @NotNull PositionVector leftTilePosition, @NotNull @NotNull PositionVector rightTilePosition) Creates an instance of aIrrigationChannelPositionrecord class.- Parameters:
leftTilePosition- the value for theleftTilePositionrecord componentrightTilePosition- the value for therightTilePositionrecord 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. All components in this record class are compared withObjects::equals(Object,Object). -
leftTilePosition
Returns the value of theleftTilePositionrecord component.- Returns:
- the value of the
leftTilePositionrecord component
-
rightTilePosition
Returns the value of therightTilePositionrecord component.- Returns:
- the value of the
rightTilePositionrecord component
-