Basic reformat, hit once, hope never again
This commit is contained in:
@@ -58,6 +58,25 @@ public enum ReadableNumberConverter
|
||||
return String.format( "%s%d%s", sign, result, postFix );
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets character representation of the sign of a number
|
||||
*
|
||||
* @param number maybe signed number
|
||||
*
|
||||
* @return '-' if the number is signed, else an empty character
|
||||
*/
|
||||
private String getSign( long number )
|
||||
{
|
||||
if( number < 0 )
|
||||
{
|
||||
return "-";
|
||||
}
|
||||
else
|
||||
{
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts a number into a human readable form. It will not round the number, but floor it.
|
||||
* Will try to cut the number down 1 decimal earlier. This will limit the String size to 3 chars.
|
||||
@@ -92,23 +111,4 @@ public enum ReadableNumberConverter
|
||||
return String.format( "%s%d%s", sign, result, postFix );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets character representation of the sign of a number
|
||||
*
|
||||
* @param number maybe signed number
|
||||
*
|
||||
* @return '-' if the number is signed, else an empty character
|
||||
*/
|
||||
private String getSign( long number )
|
||||
{
|
||||
if ( number < 0 )
|
||||
{
|
||||
return "-";
|
||||
}
|
||||
else
|
||||
{
|
||||
return "";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user