Record Class Coordinate.TrackAndSectorCoordinate
java.lang.Object
java.lang.Record
org.applecommander.os.Coordinate.TrackAndSectorCoordinate
- All Implemented Interfaces:
Coordinate
- Enclosing interface:
Coordinate
public static record Coordinate.TrackAndSectorCoordinate(int track, int sector)
extends Record
implements Coordinate
Represents a DOS track and sector coordinate. Potentially as a physical coordinate
for a 140K floppy.
-
Nested Class Summary
Nested classes/interfaces inherited from interface Coordinate
Coordinate.BlockCoordinate, Coordinate.TrackAndSectorCoordinate, Coordinate.TrackCoordinate -
Constructor Summary
ConstructorsConstructorDescriptionTrackAndSectorCoordinate(int track, int sector) Creates an instance of aTrackAndSectorCoordinaterecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intsector()Returns the value of thesectorrecord component.toString()Returns a string representation of this record class.inttrack()Returns the value of thetrackrecord component.
-
Constructor Details
-
TrackAndSectorCoordinate
public TrackAndSectorCoordinate(int track, int sector) Creates an instance of aTrackAndSectorCoordinaterecord class.- Parameters:
track- the value for thetrackrecord componentsector- the value for thesectorrecord component
-
-
Method Details
-
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 thecomparemethod from their corresponding wrapper classes. -
toString
-
hashCode
-
track
public int track()Returns the value of thetrackrecord component.- Returns:
- the value of the
trackrecord component
-
sector
public int sector()Returns the value of thesectorrecord component.- Returns:
- the value of the
sectorrecord component
-