mirror of
https://github.com/dmolony/DiskBrowser.git
synced 2024-06-29 21:29:36 +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 ();
|
return this.block - that.getBlock ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean matches (DiskAddress that)
|
||||||
|
{
|
||||||
|
return this.block == that.getBlock ();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getBlock ()
|
public int getBlock ()
|
||||||
{
|
{
|
||||||
|
|
|
@ -9,4 +9,6 @@ public interface DiskAddress extends Comparable<DiskAddress>
|
||||||
public int getSector ();
|
public int getSector ();
|
||||||
|
|
||||||
public Disk getDisk ();
|
public Disk getDisk ();
|
||||||
|
|
||||||
|
public boolean matches (DiskAddress other);
|
||||||
}
|
}
|
|
@ -53,7 +53,7 @@ class DosTSListSector extends AbstractSector
|
||||||
public String createText ()
|
public String createText ()
|
||||||
{
|
{
|
||||||
DiskAddress da = disk.getDiskAddress (buffer[1], buffer[2]);
|
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);
|
StringBuilder text = getHeader ("TS List Sector : " + name);
|
||||||
addText (text, buffer, 0, 1, "Not used");
|
addText (text, buffer, 0, 1, "Not used");
|
||||||
|
|
Loading…
Reference in New Issue
Block a user