Package org.eclipse.equinox.p2.metadata
Class VersionedId
java.lang.Object
org.eclipse.equinox.p2.metadata.VersionedId
- All Implemented Interfaces:
- IVersionedId
An object representing a (id,version) pair. An instance of this class can be constructed
 by invoking the constructor or calling 
parse(String) with a string 
 representation of this VersionedID.- Since:
- 2.0
- Restriction:
- This class is not intended to be subclassed by clients.
- 
Constructor SummaryConstructorsConstructorDescriptionVersionedId(String id, String version) Creates a new versioned id with the given id and version.VersionedId(String id, Version version) Creates a new versioned id with the given id and version.
- 
Method SummaryModifier and TypeMethodDescriptionbooleangetId()Returns the id portion of this versioned id.Returns the version portion of this versioned id.inthashCode()static IVersionedIdCreates and returns a newVersionedIdfrom the given string specification.toString()Returns a string representation of this versioned id.
- 
Constructor Details- 
VersionedIdCreates a new versioned id with the given id and version.- Parameters:
- id- The identifier
- version- The version
- Throws:
- IllegalArgumentException- If- versionis improperly formatted.
 
- 
VersionedIdCreates a new versioned id with the given id and version.- Parameters:
- id- The identifier
- version- The version
 
 
- 
- 
Method Details- 
parseCreates and returns a newVersionedIdfrom the given string specification. The specification must be of the form "id/version", or just "id" if the version is absentThis factory method can be used to reconstruct a VersionedIdinstance from the string representation produced by a previous invocation oftoString().- Parameters:
- spec- the specification for the versioned id to create
- Returns:
- the parsed versioned id
- Throws:
- IllegalArgumentException- If- specis improperly formatted.
 
- 
getIdDescription copied from interface:IVersionedIdReturns the id portion of this versioned id.- Specified by:
- getIdin interface- IVersionedId
- Returns:
- the ID of this VersionedID
 
- 
getVersionDescription copied from interface:IVersionedIdReturns the version portion of this versioned id.- Specified by:
- getVersionin interface- IVersionedId
- Returns:
- the Version of this VersionedID
 
- 
equals
- 
hashCodepublic int hashCode()
- 
toStringReturns a string representation of this versioned id. The result can be used to later construct an equalVersionedIdinstance using {parse(String).
 
-