| java.lang.Object | |
| ↳ | com.google.gdata.util.Version |
The Version class is a helper class that describes version information about a particular type of service.
| Constants | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| int | ANY | The ANY value indicates a version component that will match any revision. | |||||||||
| Fields | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| VERSION_PROPERTY_PATTERN | Regex that description the format of a version description. | ||||||||||
| impliedVersions | |||||||||||
| major | |||||||||||
| minor | |||||||||||
| serviceClass | |||||||||||
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Creates a new Version instance for the specified service and defines
the major and minor versions for the service.
| |||||||||||
Creates a new Version instance using a version description with the
format
[{service}]{major}.{minor}. | |||||||||||
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Returns a version that matches the input service type and major version but
ANY minor version. | |||||||||||
Finds a matching version for
serviceClass in a list of versions,
or returns null otherwise. | |||||||||||
Returns the list of related services versions that are implied by this
version.
| |||||||||||
Returns the major revision of the version.
| |||||||||||
Returns the minor revision of the version.
| |||||||||||
Returns the service type of the version.
| |||||||||||
Returns the String representation of the version.
| |||||||||||
Returns
true if this version is a later version than the argument,
on the basis of comparing the major and minor versions. | |||||||||||
Returns
true if this version is a earlier version than the
argument, on the basis of comparing the major and minor versions. | |||||||||||
Returns
true if the specified version is compatible with this
version or one of its implied versions. | |||||||||||
Returns
true if the target version is for the same service. | |||||||||||
Returns
true if the specified version is a match with this version
or one of its implied versions. | |||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
The ANY value indicates a version component that will match any revision.
Regex that description the format of a version description. The first (optional) group is the service name, followed by a group containing the major version, and then another optional group that contains the minor version number preceded by a dot ('.').
Creates a new Version instance for the specified service and defines the major and minor versions for the service.
| serviceClass | The service type. |
|---|---|
| major | The major revision number of the service. |
| minor | The minor revision number of the service. |
| impliedVersions |
| NullPointerException | if the service type is null. |
|---|---|
| IllegalArgumentException | if revision values are invalid. |
Creates a new Version instance using a version description with the
format [{service}]{major}.{minor}.
| serviceClass | The service type. |
|---|---|
| versionDescription | The service description. |
| impliedVersions |
| IllegalArgumentException | if the versionDescription has an invalid syntax or includes a service name that does not match the service type. |
|---|
Returns a version that matches the input service type and major version but
ANY minor version.
| v | Input version type |
|---|
| o |
|---|
Finds a matching version for serviceClass in a list of versions,
or returns null otherwise.
| versionList | The list of versions to search. |
|---|---|
| serviceClass | The service class to match. |
null.
Returns the list of related services versions that are implied by this version.
Returns the major revision of the version.
Returns the minor revision of the version.
Returns the service type of the version.
Returns the String representation of the version.
Returns true if this version is a later version than the argument,
on the basis of comparing the major and minor versions. For the purposes of
comparison, a value of ANY is considered to be
MAX_VALUE, so no finite version number may come after it.
| v | Version to compare against |
|---|
true if this version is later than the argument| IllegalArgumentException | if the provided version is not for the same service as this version or for one implied by this version. |
|---|
Returns true if this version is a earlier version than the
argument, on the basis of comparing the major and minor versions. For the
purposes of comparison, a value of ANY is considered to be
MIN_VALUE, so no finite version number may come before it.
| v | Version to compare against |
|---|
true if this version is later than the argument| IllegalArgumentException | if the provided version is not for the same service as this version or for one implied by this version. |
|---|
Returns true if the specified version is compatible with this
version or one of its implied versions. Two versions are compatible if they
are for the same service and have a matching major version number (or one
of them has a major version of ANY).
| v |
|---|
Returns true if the target version is for the same service.
| v | Target version to check. |
|---|
true if service matches.
Returns true if the specified version is a match with this version
or one of its implied versions. Two versions are compatible if they are for
the same service and have matching major and minor version numbers. A
version number is a match if it is the same or one is ANY.
| v |
|---|