public Version(@NonNull String version) throws ParseException {
  final String[] numberStrings=version.split("\\.");
  final int versionsCount=Math.min(NUMBERS_COUNT,numberStrings.length);
  for (int i=0; i < versionsCount; i++) {
    final String numberString=numberStrings[i];
    final char firstChar=numberString.charAt(0);
    if (firstChar == '-' || firstChar == '+') {
      throw new VersionParseException(0);
    }
    try {
      numbers[i]=Integer.parseInt(numberString);
    }
 catch (    NumberFormatException e) {
      throw new VersionParseException(version.indexOf(numberString));
    }
  }
}

public Version ( @ NonNull String version ) throws ParseException { final String [ ] numberStrings = version . split ( "\\." ) ; final int versionsCount = Math . min ( NUMBERS_COUNT , numberStrings . length ) ; for ( int i = 0 ; i < versionsCount ; i ++ ) { final String numberString = numberStrings [ i ] ; final char firstChar = numberString . charAt ( 0 ) ; if ( firstChar == '-' || firstChar == '+' ) { throw new VersionParseException ( 0 ) ; } try { numbers [ i ] = Integer . parseInt ( numberString ) ; } catch ( NumberFormatException e ) { throw new VersionParseException ( version . indexOf ( numberString ) ) ; } } }
create a new instance from the provided version string .
