public Version(final String version){
  final StringTokenizer tokens=new StringTokenizer(version,".",false);
  if (tokens.countTokens() < 1) {
    throw new IllegalArgumentException("invalid version string:" + version);
  }
  try {
    m_major=Integer.parseInt(tokens.nextToken());
    if (tokens.hasMoreTokens()) {
      m_minor=Integer.parseInt(tokens.nextToken());
    }
 else {
      m_minor=0;
    }
    if (tokens.hasMoreTokens()) {
      m_point=Integer.parseInt(tokens.nextToken());
    }
 else {
      m_point=0;
    }
    if (tokens.hasMoreTokens()) {
      m_micro=Integer.parseInt(tokens.nextToken());
    }
 else {
      m_micro=0;
    }
  }
 catch (  final NumberFormatException e) {
    throw new IllegalArgumentException("invalid version string:" + version);
  }
}

public Version ( final String version ) { final StringTokenizer tokens = new StringTokenizer ( version , "." , false ) ; if ( tokens . countTokens ( ) < 1 ) { throw new IllegalArgumentException ( "invalid version string:" + version ) ; } try { m_major = Integer . parseInt ( tokens . nextToken ( ) ) ; if ( tokens . hasMoreTokens ( ) ) { m_minor = Integer . parseInt ( tokens . nextToken ( ) ) ; } else { m_minor = 0 ; } if ( tokens . hasMoreTokens ( ) ) { m_point = Integer . parseInt ( tokens . nextToken ( ) ) ; } else { m_point = 0 ; } if ( tokens . hasMoreTokens ( ) ) { m_micro = Integer . parseInt ( tokens . nextToken ( ) ) ; } else { m_micro = 0 ; } } catch ( final NumberFormatException e ) { throw new IllegalArgumentException ( "invalid version string:" + version ) ; } }
version must be of the from xx . xx . xx . xx or xx . xx . xx or xx . xx or xx where xx is a positive integer
