java.lang.Object
java.lang.Record
org.jhotdraw8.base.concurrent.TileTask.Tile
- Enclosing class:
TileTask
-
Constructor Summary
ConstructorsConstructorDescriptionTile(int xfrom, int yfrom, int xto, int yto) Creates an instance of aTilerecord 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.final StringtoString()Returns a string representation of this record class.intxfrom()Returns the value of thexfromrecord component.intxto()Returns the value of thextorecord component.intyfrom()Returns the value of theyfromrecord component.intyto()Returns the value of theytorecord component.
-
Constructor Details
-
Tile
public Tile(int xfrom, int yfrom, int xto, int yto) Creates an instance of aTilerecord class.- Parameters:
xfrom- the value for thexfromrecord componentyfrom- the value for theyfromrecord componentxto- the value for thextorecord componentyto- the value for theytorecord 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 with '=='. -
xfrom
public int xfrom()Returns the value of thexfromrecord component.- Returns:
- the value of the
xfromrecord component
-
yfrom
public int yfrom()Returns the value of theyfromrecord component.- Returns:
- the value of the
yfromrecord component
-
xto
public int xto()Returns the value of thextorecord component.- Returns:
- the value of the
xtorecord component
-
yto
public int yto()Returns the value of theytorecord component.- Returns:
- the value of the
ytorecord component
-