public FormatInteger(final int in,final boolean group){
  if (in < 0) {
    throw new IllegalArgumentException("leading digits is negative:" + in);
  }
  mLength=in;
  mPadding=new char[mLength];
  final StringBuilder sb=new StringBuilder();
  for (int i=0; i < mLength; i++) {
    mPadding[i]=' ';
    sb.append(" ");
  }
  mBlanks=sb.toString();
  mLocalFormat.setGroupingUsed(group);
}

public FormatInteger ( final int in , final boolean group ) { if ( in < 0 ) { throw new IllegalArgumentException ( "leading digits is negative:" + in ) ; } mLength = in ; mPadding = new char [ mLength ] ; final StringBuilder sb = new StringBuilder ( ) ; for ( int i = 0 ; i < mLength ; i ++ ) { mPadding [ i ] = ' ' ; sb . append ( " " ) ; } mBlanks = sb . toString ( ) ; mLocalFormat . setGroupingUsed ( group ) ; }
construct a format for a real .
