We have a GUI table that has columns for data size. It may hold values that would be rendered to the user as “10 GB”, “15 MB”, etc.
The problem is the values are currently stored as plain strings. It means the values are sorted in a way that doesn’t reflect their actual size. In my example, “15 MB” would be considered greater than “10 GB”.
Is there some type, I expect it to be a Comparable
, that would represent such values more accurately?
Java 8.