mirror of
https://github.com/AppleCommander/AppleCommander.git
synced 2024-10-31 16:04:51 +00:00
Adding integer type conversion supporting hex prefixes "$" and "0x" as
well as decimal.
This commit is contained in:
parent
46a2455922
commit
8ce99c4efa
@ -21,6 +21,7 @@ package io.github.applecommander.acx.arggroup;
|
||||
|
||||
import com.webcodepro.applecommander.storage.Disk;
|
||||
|
||||
import io.github.applecommander.acx.converter.IntegerTypeConverter;
|
||||
import picocli.CommandLine.ArgGroup;
|
||||
import picocli.CommandLine.Option;
|
||||
|
||||
@ -61,9 +62,11 @@ public class CoordinateSelection {
|
||||
}
|
||||
|
||||
public static class SectorCoordinateSelection {
|
||||
@Option(names = { "-t", "--track" }, required = true, description = "Track number.")
|
||||
@Option(names = { "-t", "--track" }, required = true, converter = IntegerTypeConverter.class,
|
||||
description = "Track number.")
|
||||
private Integer track;
|
||||
@Option(names = { "-s", "--sector" }, required = true, description = "Sector number.")
|
||||
@Option(names = { "-s", "--sector" }, required = true, converter = IntegerTypeConverter.class,
|
||||
description = "Sector number.")
|
||||
private Integer sector;
|
||||
|
||||
public boolean isBootSector() {
|
||||
@ -77,7 +80,8 @@ public class CoordinateSelection {
|
||||
}
|
||||
}
|
||||
public static class BlockCoordinateSelection {
|
||||
@Option(names = { "-b", "--block" }, description = "Block number.")
|
||||
@Option(names = { "-b", "--block" }, converter = IntegerTypeConverter.class,
|
||||
description = "Block number.")
|
||||
private Integer block;
|
||||
|
||||
public boolean isBootBlock() {
|
||||
|
Loading…
Reference in New Issue
Block a user