Code example for NumberFormat

Methods: setGroupingUsed, setMinimumIntegerDigits

0
  static private Random rand = new Random();
 
  private static NumberFormat idFormat = NumberFormat.getInstance();
 
  static { 
    idFormat.setMinimumIntegerDigits(4);
    idFormat.setGroupingUsed(false);
  } 
 
  /** 
   * Cleans the data from the passed Path in the passed FileSystem. 
   *  
   * @param fs FileSystem to delete data from. 
   * @param dirPath Path to be deleted. 
   * @throws IOException If an error occurs cleaning the data. 
   */ 
  static void cleanData(FileSystem fs, Path dirPath) throws IOException {
    fs.delete(dirPath, true);
  } 
 
  /**