Record Class TrackSectorDevice.Geometry
java.lang.Object
java.lang.Record
org.applecommander.device.TrackSectorDevice.Geometry
- All Implemented Interfaces:
InformationProvider
- Enclosing interface:
TrackSectorDevice
public static record TrackSectorDevice.Geometry(int tracksOnDisk, int sectorsPerTrack)
extends Record
implements InformationProvider
-
Constructor Summary
ConstructorsConstructorDescriptionGeometry(int tracksOnDisk, int sectorsPerTrack) Creates an instance of aGeometryrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintcalculateSectorOffset(int track, int sector) intfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.sectorOffsetToCoordinate(int sectorOffset) intintReturns the value of thesectorsPerTrackrecord component.final StringtoString()Returns a string representation of this record class.intReturns the value of thetracksOnDiskrecord component.
-
Constructor Details
-
Geometry
public Geometry(int tracksOnDisk, int sectorsPerTrack) Creates an instance of aGeometryrecord class.- Parameters:
tracksOnDisk- the value for thetracksOnDiskrecord componentsectorsPerTrack- the value for thesectorsPerTrackrecord component
-
-
Method Details
-
sectorsPerDisk
public int sectorsPerDisk() -
deviceSize
public int deviceSize() -
calculateSectorOffset
public int calculateSectorOffset(int track, int sector) -
sectorOffsetToCoordinate
-
information
- Specified by:
informationin interfaceInformationProvider
-
toString
-
hashCode
-
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. -
tracksOnDisk
public int tracksOnDisk()Returns the value of thetracksOnDiskrecord component.- Returns:
- the value of the
tracksOnDiskrecord component
-
sectorsPerTrack
public int sectorsPerTrack()Returns the value of thesectorsPerTrackrecord component.- Returns:
- the value of the
sectorsPerTrackrecord component
-