@Override
    public int compareTo(Version o)
    {
        if (o == null)
        {
            throw new NullPointerException();
        }
        
        if (major != o.major)
        {
            return major < o.major ? -1 : 1;
        }
        
        if (minor != o.minor)
        {
            return minor < o.minor ? -1 : 1;
        }
        
        if (isSnapshot() && !o.isSnapshot())
        {
            return -1;
        }
        
        if (isRelease() && !o.isRelease())
        {
            return -1;
        }
        
        return 0;
    }