SpecificationItemId implements Comparable<SpecificationItemId> { @Override public String toString() { final StringBuilder builder = new StringBuilder() .append(this.artifactType) .append(ARTIFACT_TYPE_SEPARATOR) .append(this.name) .append(REVISION_SEPARATOR) .append(this.revision); return builder.toString(); } protected  SpecificationItemId(final String name, final String artifactType, final int revision); String getName(); int getRevision(); String getArtifactType(); @Override @Generated(value = "org.eclipse.Eclipse") final int hashCode(); @Override @Generated(value = "org.eclipse.Eclipse") final boolean equals(final Object obj); @Override String toString(); SpecificationItemId toRevisionWildcard(); static SpecificationItemId parseId(final String idText); static SpecificationItemId createId(final String artifactType, final String name,
            final int revision); static SpecificationItemId createId(final String artifactType, final String name); @Override int compareTo(final SpecificationItemId other); static final String UNKNOWN_ARTIFACT_TYPE; static final String ITEM_REVISION_PATTERN; static final String ITEM_NAME_PATTERN; static final String ARTIFACT_TYPE_SEPARATOR; static final String REVISION_SEPARATOR; static final int REVISION_WILDCARD; static final Pattern ID_PATTERN; static final Pattern LEGACY_NAME_PATTERN; static final Pattern LEGACY_ID_PATTERN; }
@Test void testToString() { final Builder builder = new Builder(); builder.artifactType("dsn").name("dummy").revision(3); assertThat(builder.build().toString(), equalTo("dsn~dummy~3")); }
@Test void testToStringRevisionWildcard() { final Builder builder = new Builder(); builder.artifactType("dsn").name("dummy").revisionWildcard(); assertThat(builder.build().toString(), equalTo("dsn~dummy~" + SpecificationItemId.REVISION_WILDCARD)); }