Code example for NumberFormat

Methods: parse

0
  private Utils() {} 
 
  public static boolean isValidAmount(String amount) {
    if (amount == null) return false;
    try { 
      Number n = TWO_DEC.parse(amount);
      return n != null && n.doubleValue() > 0.0d;
    } catch (ParseException e) {
      return false; 
    } 
  } 
 
  /** 
   * Util method 
   * @param permissionTypes String[] 
   * @return comma separated permission string 
   */ 
  public static String toPermissions(String[] permissionTypes) {
    StringBuilder sb = new StringBuilder();
    if (permissionTypes != null)
      for (int i = 0; i < permissionTypes.length; i++) {