Record Class GateData
java.lang.Object
java.lang.Record
org.sgrewritten.stargate.network.portal.portaldata.GateData
- Record Components:
gateFormat- What defines this gate's layout/format/design.flipZ- Whether this portal is flipped on the Z axis.topLeft- The Location of the top-left block of this portal.facing- The direction that this portal is facing.
public record GateData(GateFormatAPI gateFormat, boolean flipZ, org.bukkit.Location topLeft, org.bukkit.block.BlockFace facing)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionGateData(GateFormatAPI gateFormat, boolean flipZ, org.bukkit.Location topLeft, org.bukkit.block.BlockFace facing) Creates an instance of aGateDatarecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.org.bukkit.block.BlockFacefacing()Returns the value of thefacingrecord component.booleanflipZ()Returns the value of theflipZrecord component.Returns the value of thegateFormatrecord component.final inthashCode()Returns a hash code value for this object.org.bukkit.LocationtopLeft()Returns the value of thetopLeftrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
GateData
public GateData(GateFormatAPI gateFormat, boolean flipZ, org.bukkit.Location topLeft, org.bukkit.block.BlockFace facing) Creates an instance of aGateDatarecord class.- Parameters:
gateFormat- the value for thegateFormatrecord componentflipZ- the value for theflipZrecord componenttopLeft- the value for thetopLeftrecord componentfacing- the value for thefacingrecord 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 '=='. -
gateFormat
Returns the value of thegateFormatrecord component.- Returns:
- the value of the
gateFormatrecord component
-
flipZ
public boolean flipZ()Returns the value of theflipZrecord component.- Returns:
- the value of the
flipZrecord component
-
topLeft
public org.bukkit.Location topLeft()Returns the value of thetopLeftrecord component.- Returns:
- the value of the
topLeftrecord component
-
facing
public org.bukkit.block.BlockFace facing()Returns the value of thefacingrecord component.- Returns:
- the value of the
facingrecord component
-