public int compareTo(Spec<VERSION> other) {
        int result = name.compareTo(other.name);
        if (result != 0)
            return result;

        result = versionHandler.compare(version, other.version);
        if (result != 0)
            return result;

        return compare(namespace, other.namespace);
    }
Code common to ComponentId and ComponentSpecification

@author Tony Vaagenes
component/src/main/java/com/yahoo/component/Spec.java