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 PositionVector
The field for theleftTilePosition
record component.private final @NotNull PositionVector
The field for therightTilePosition
record component. -
Constructor Summary
ConstructorsConstructorDescriptionIrrigationChannelPosition
(@NotNull PositionVector leftTilePosition, @NotNull PositionVector rightTilePosition) Creates an instance of aIrrigationChannelPosition
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.@NotNull PositionVector
Returns the value of theleftTilePosition
record component.@NotNull PositionVector
Returns the value of therightTilePosition
record component.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
leftTilePosition
The field for theleftTilePosition
record component. -
rightTilePosition
The field for therightTilePosition
record component.
-
-
Constructor Details
-
IrrigationChannelPosition
public IrrigationChannelPosition(@NotNull @NotNull PositionVector leftTilePosition, @NotNull @NotNull PositionVector rightTilePosition) Creates an instance of aIrrigationChannelPosition
record class.- Parameters:
leftTilePosition
- the value for theleftTilePosition
record componentrightTilePosition
- the value for therightTilePosition
record 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 theleftTilePosition
record component.- Returns:
- the value of the
leftTilePosition
record component
-
rightTilePosition
Returns the value of therightTilePosition
record component.- Returns:
- the value of the
rightTilePosition
record component
-