diff options
author | ibull | 2010-03-09 03:30:33 +0000 |
---|---|---|
committer | ibull | 2010-03-09 03:30:33 +0000 |
commit | 977641290b9287942f0665735b13de3c4e1b4678 (patch) | |
tree | be7fe08892c655d6e15b07ada6ced4c6e5e2dbb0 | |
parent | 2048f5c615193185b54ab8788e2a3792f07daf19 (diff) | |
download | rt.equinox.p2-977641290b9287942f0665735b13de3c4e1b4678.tar.gz rt.equinox.p2-977641290b9287942f0665735b13de3c4e1b4678.tar.xz rt.equinox.p2-977641290b9287942f0665735b13de3c4e1b4678.zip |
bug 302990: [api] Make VersionedID API
https://bugs.eclipse.org/bugs/show_bug.cgi?id=302990
-rw-r--r-- | bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/VersionedId.java | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/VersionedId.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/VersionedId.java index bead91830..ebd1273dc 100644 --- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/VersionedId.java +++ b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/VersionedId.java @@ -16,7 +16,9 @@ package org.eclipse.equinox.p2.metadata; import org.eclipse.equinox.internal.p2.core.helpers.StringHelper; /** - * An object representing a (id,version) pair. + * An object representing a (id,version) pair. An instance of this class can be constructed + * by invoking the constructor or calling {@link VersionedId#parse(String)} with a string + * representation of this VersionedID. * * @noextend This class is not intended to be subclassed by clients. * @@ -68,6 +70,20 @@ public class VersionedId implements IVersionedId { this.version = (version == null) ? Version.emptyVersion : version; } + /** + * @return the ID of this VersionedID + */ + public String getId() { + return id; + } + + /** + * @return the Version of this VersionedID + */ + public Version getVersion() { + return version; + } + public boolean equals(Object obj) { if (this == obj) return true; @@ -83,14 +99,6 @@ public class VersionedId implements IVersionedId { return id.hashCode() * 31 + version.hashCode(); } - public String getId() { - return id; - } - - public Version getVersion() { - return version; - } - /** * Returns a string representation of this versioned id. * The result can be used to later construct an equal {@link VersionedId} |