public int compareTo(ComponentId other) {
        //anonymous must never be equal to non-anonymous
        if (isAnonymous() ^ other.isAnonymous()) {
            return isAnonymous() ? -1 : 1;
        }

        return spec.compareTo(other.spec);
    }
Returns the string value of this id.
If no version is given, this is simply the name.
If a version is given, it is name:version.
Trailing ".0"'s are stripped from the version part.
component/src/main/java/com/yahoo/component/ComponentId.java