public class VersionedId extends Object implements IVersionedId
parse(String)
with a string
representation of this VersionedID.Constructor and Description |
---|
VersionedId(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.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
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(String spec)
Creates and returns a new
VersionedId from the given string specification. |
String |
toString()
Returns a string representation of this versioned id.
|
public VersionedId(String id, String version)
id
- The identifierversion
- The versionIllegalArgumentException
- If version
is improperly
formatted.public static IVersionedId parse(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 createIllegalArgumentException
- If spec
is improperly
formatted.public String getId()
IVersionedId
getId
in interface IVersionedId
public Version getVersion()
IVersionedId
getVersion
in interface IVersionedId
public String toString()
VersionedId
instance using {parse(String)
.
Copyright (c) 2000, 2015 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.