docs: public int compareTo(Version ver) 
    {
      int[] otherComponents = ver._components;
  
      // work out the minimum length of the components for each version.
      int mylen = _components.length;
      int otherlen = otherComponents.length;
      // work out if the other one is longer than this one.
      boolean longer = (mylen < otherlen);
      int minLen = (longer ? mylen : otherlen);
      
      // loop around all the entries up to the minimum length
      int i = 0;
      for ( i=0; i < minLen; i++ ) 
      {
        int firstVal = _components[i];
        int secondVal = otherComponents[i];
        if ( firstVal < secondVal ) return -1;
        if ( firstVal > secondVal ) return 1;
      }
  
      
      if (mylen != otherlen)
      {
        // if we are here then we know that so far they are equal.
        // In order for them to be truly equal the longer one must
        // contain only zeros. Otherwise the longer version is
        // higher than the shorter version.
        if (longer) 
        {
          for (int j = i+1; j<otherlen; j++) 
          {
            if (otherComponents[j] != 0) return -1;
          }
        } 
        else 
        {
          for (int j = i+1; j<mylen; j++) 
          {
            if (_components[j] != 0) return 1;
          }
        }
      }
      
      // if we get here then they are equal.
      return 0;
    }