Commit 0991984 1 parent 7da59c6 commit 0991984 Copy full SHA for 0991984
File tree 2 files changed +12
-16
lines changed
src/main/java/DiscUtils/Fat
2 files changed +12
-16
lines changed Original file line number Diff line number Diff line change @@ -321,17 +321,7 @@ public void setFileSystemType(String value) {
321
321
* Gets the friendly name for the file system, including FAT variant.
322
322
*/
323
323
public String getFriendlyName () {
324
- switch (getFatVariant ()) {
325
- case Fat12 :
326
- return "Microsoft FAT12" ;
327
- case Fat16 :
328
- return "Microsoft FAT16" ;
329
- case Fat32 :
330
- return "Microsoft FAT32" ;
331
- default :
332
- return "Unknown FAT" ;
333
-
334
- }
324
+ return _fatVariant .getFriendlyName ();
335
325
}
336
326
337
327
/**
Original file line number Diff line number Diff line change @@ -32,28 +32,34 @@ public enum FatType {
32
32
/**
33
33
* Represents no known FAT type.
34
34
*/
35
- None (0 ),
35
+ None (0 , "Unknown FAT" ),
36
36
/**
37
37
* Represents a 12-bit FAT.
38
38
*/
39
- Fat12 (12 ),
39
+ Fat12 (12 , "Microsoft FAT12" ),
40
40
/**
41
41
* Represents a 16-bit FAT.
42
42
*/
43
- Fat16 (16 ),
43
+ Fat16 (16 , "Microsoft FAT16" ),
44
44
/**
45
45
* Represents a 32-bit FAT.
46
46
*/
47
- Fat32 (32 );
47
+ Fat32 (32 , "Microsoft FAT32" );
48
48
49
49
private int value ;
50
+ private String friendlyName ;
50
51
51
52
public int getValue () {
52
53
return value ;
53
54
}
54
55
55
- private FatType (int value ) {
56
+ public String getFriendlyName () {
57
+ return friendlyName ;
58
+ }
59
+
60
+ private FatType (int value , String friendlyName ) {
56
61
this .value = value ;
62
+ this .friendlyName = friendlyName ;
57
63
}
58
64
59
65
public static FatType valueOf (int value ) {
You can’t perform that action at this time.
0 commit comments