code: private static double parseResizeWeight(String token) {
          if (token.equals("g") || token.equals("grow")) {
              return DEFAULT_GROW;
          }
          if (token.equals("n") || token.equals("nogrow") || token.equals("none")) {
              return NO_GROW;
          }
          // Must have format: grow(<double>)
          if ((token.startsWith("grow(") || token.startsWith("g("))
                  && token.endsWith(")")) {
              int leftParen = token.indexOf('(');
              int rightParen = token.indexOf(')');
              String substring = token.substring(leftParen + 1, rightParen);
              return Double.parseDouble(substring);
          }
          throw new IllegalArgumentException(
                  "The resize argument '" + token + "' is invalid. "
                  + " Must be one of: grow, g, none, n, grow(<double>), g(<double>)");
      }
docs: Decodes an encoded resize mode and resize weight and answers the resize weight.
  
  @param token	the encoded resize weight
  @return the decoded resize weight
  @throws IllegalArgumentException if the string description is an invalid string
  representation