mirror of
https://github.com/dmolony/DiskBrowser.git
synced 2024-06-22 17:29:29 +00:00
helper function
This commit is contained in:
parent
f33f3f52c0
commit
89f315cc53
|
@ -36,6 +36,12 @@ public class AppleDiskAddress implements DiskAddress
|
|||
return this.block - that.getBlock ();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean matches (DiskAddress that)
|
||||
{
|
||||
return this.block == that.getBlock ();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getBlock ()
|
||||
{
|
||||
|
|
|
@ -9,4 +9,6 @@ public interface DiskAddress extends Comparable<DiskAddress>
|
|||
public int getSector ();
|
||||
|
||||
public Disk getDisk ();
|
||||
|
||||
public boolean matches (DiskAddress other);
|
||||
}
|
|
@ -53,7 +53,7 @@ class DosTSListSector extends AbstractSector
|
|||
public String createText ()
|
||||
{
|
||||
DiskAddress da = disk.getDiskAddress (buffer[1], buffer[2]);
|
||||
String msg = da.compareTo (diskAddress) == 0 ? " (circular reference)" : "";
|
||||
String msg = da.matches (diskAddress) ? " (circular reference)" : "";
|
||||
|
||||
StringBuilder text = getHeader ("TS List Sector : " + name);
|
||||
addText (text, buffer, 0, 1, "Not used");
|
||||
|
|
Loading…
Reference in New Issue
Block a user