public static < N extends Number > int getRHD ( N number ) { String numberAsString = String . valueOf ( number ) ; return numberAsString . substring ( numberAsString . lastIndexOf ( ' ' ) + 1 ) . length ( ) ; }
Returns the number of places after the decimal separator of the given number .