private static Double parseValue(String value) {

    int length = value.length();
    if (value.charAt(length - 1) == '%') {
      double percent = Double.parseDouble(value.substring(0, length - 1));
      return Double.valueOf(percent * PERCENT_FACTOR);
    } else {
      return Double.valueOf(value);
    }
  }
private static Double parseValue ( String value ) { int length = value . length ( ) ; if ( value . charAt ( length - 1 ) == '%' ) { double percent = Double . parseDouble ( value . substring ( 0 , length - 1 ) ) ; return Double . valueOf ( percent * PERCENT_FACTOR ) ; } else { return Double . valueOf ( value ) ; } }
@param value is the {@link #getValue() value} given as {@link #toStringAsFactor() factor} or
{@link #toStringAsPercent() percent} {@link String}.
@return the parsed value.