Package top.untold.frostlumen.core.data
Record Class ScaleOffset
java.lang.Object
java.lang.Record
top.untold.frostlumen.core.data.ScaleOffset
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionScaleOffset(double xScale, int xOffset, double yScale, int yOffset) Creates an instance of aScaleOffsetrecord class. -
Method Summary
Modifier and TypeMethodDescriptionadd(double xScale, int xOffset, double yScale, int yOffset) add(ScaleOffset other) addOffset(int xOffset, int yOffset) addScale(double xScale, double yScale) addXOffset(int xOffset) addXScale(double xScale) addYOffset(int yOffset) addYScale(double yScale) final booleanIndicates whether some other object is "equal to" this one.static ScaleOffsetfromOffset(int xOffset, int yOffset) static ScaleOffsetfromScale(double xScale, double yScale) final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.withOffset(int xOffset, int yOffset) withScale(double xScale, double yScale) withX(double xScale, int xOffset) withXOffset(int xOffset) withXScale(double xScale) withY(double yScale, int yOffset) withYOffset(int yOffset) withYScale(double yScale) intxOffset()Returns the value of thexOffsetrecord component.doublexScale()Returns the value of thexScalerecord component.intyOffset()Returns the value of theyOffsetrecord component.doubleyScale()Returns the value of theyScalerecord component.
-
Field Details
-
ZERO
-
-
Constructor Details
-
ScaleOffset
public ScaleOffset(double xScale, int xOffset, double yScale, int yOffset) Creates an instance of aScaleOffsetrecord class.- Parameters:
xScale- the value for thexScalerecord componentxOffset- the value for thexOffsetrecord componentyScale- the value for theyScalerecord componentyOffset- the value for theyOffsetrecord component
-
-
Method Details
-
withScale
-
withOffset
-
withXScale
-
withX
-
withY
-
withYScale
-
withXOffset
-
withYOffset
-
fromScale
-
fromOffset
-
add
-
addScale
-
addXScale
-
addYScale
-
addOffset
-
addXOffset
-
addYOffset
-
add
-
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 with '=='. -
xScale
public double xScale()Returns the value of thexScalerecord component.- Returns:
- the value of the
xScalerecord component
-
xOffset
public int xOffset()Returns the value of thexOffsetrecord component.- Returns:
- the value of the
xOffsetrecord component
-
yScale
public double yScale()Returns the value of theyScalerecord component.- Returns:
- the value of the
yScalerecord component
-
yOffset
public int yOffset()Returns the value of theyOffsetrecord component.- Returns:
- the value of the
yOffsetrecord component
-