public class VersionedId extends java.lang.Object implements IVersionedId
parse(String) with a string
representation of this VersionedID.| Constructor and Description |
|---|
VersionedId(java.lang.String id,
java.lang.String version)
Creates a new versioned id with the given id and version.
|
VersionedId(java.lang.String id,
Version version)
Creates a new versioned id with the given id and version.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj) |
java.lang.String |
getId()
Returns the id portion of this versioned id.
|
Version |
getVersion()
Returns the version portion of this versioned id.
|
int |
hashCode() |
static IVersionedId |
parse(java.lang.String spec)
Creates and returns a new
VersionedId from the given string specification. |
java.lang.String |
toString()
Returns a string representation of this versioned id.
|
public VersionedId(java.lang.String id,
java.lang.String version)
id - The identifierversion - The versionjava.lang.IllegalArgumentException - If version is improperly
formatted.public VersionedId(java.lang.String id,
Version version)
id - The identifierversion - The versionpublic static IVersionedId parse(java.lang.String spec)
VersionedId from the given string specification.
The specification must be of the form "id/version", or just "id" if the version is absent
This factory method can be used to reconstruct a VersionedId
instance from the string representation produced by a previous invocation of
toString().
spec - the specification for the versioned id to createjava.lang.IllegalArgumentException - If spec is improperly
formatted.public java.lang.String getId()
IVersionedIdgetId in interface IVersionedIdpublic Version getVersion()
IVersionedIdgetVersion in interface IVersionedIdpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
VersionedId
instance using {parse(String).toString in class java.lang.Object
Copyright (c) 2000, 2018 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.