public String makeLabel ( final String quantityID ) { final StringBuilder buf = new StringBuilder ( quantityID ) ; if ( quantityID . contains ( " " ) ) { buf . insert ( 0 , ' ' ) . append ( ' ' ) ; } buf . append ( ' ' ) ; final int start = buf . length ( ) ; buf . append ( toString ( ) ) ; if ( buf . substring ( start ) . indexOf ( ' ' ) != - 1 ) { buf . insert ( start , ' ' ) . append ( ' ' ) ; } return buf . toString ( ) ; }
Returns a label for a quantity in this unit .