public class PluginVersion extends Object implements com.google.gwt.user.client.rpc.IsSerializable, Serializable, Comparable<PluginVersion>
major, minor
and revision
numbers of a browser plugin component.Constructor and Description |
---|
PluginVersion()
Creates a
PluginVersion |
PluginVersion(int major,
int minor,
int revision)
Creates a
PluginVersion with the specified minor, major and revision numbers. |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(int major,
int minor,
int revision)
Convenience method to compare this PluginVersion with a PluginVersion with the
specified major, minor and revision numbers.
|
int |
compareTo(PluginVersion o)
Compares this PluginVersion with the specified PluginVersion.
|
boolean |
equals(Object obj)
Indicates if some other object is equal to this one.
|
static PluginVersion |
get(int major,
int minor,
int revision)
Static method to create a
PluginVersion with the specified minor,
major and revision numbers. |
static PluginVersion |
get(String version)
Static method to create a
PluginVersion with the specified version string. |
int |
getMajor()
Gets major version number.
|
int |
getMinor()
Gets minor version number
|
int |
getRevision()
Gets the revsion number
|
int |
hashCode() |
void |
setMajor(int major)
Sets the major version number.
|
void |
setMinor(int minor)
Sets minor version number
|
void |
setRevision(int revision)
Sets the revision number of this PluginVersion object
|
String |
toString()
Returns a String representation of this PluginVersion in the format
major.minor.revision . |
public PluginVersion()
PluginVersion
public PluginVersion(int major, int minor, int revision)
PluginVersion
with the specified minor, major and revision numbers.major
- major version numberminor
- minor version numberrevision
- revision numberpublic static PluginVersion get(int major, int minor, int revision)
PluginVersion
with the specified minor,
major and revision numbers.major
- major version numberminor
- minor version numberrevision
- revision numberPluginVersion
object with specified version numbers.public static PluginVersion get(String version) throws RegExp.RegexException
PluginVersion
with the specified version string.version
- the version in the format major.minor.revision
.PluginVersion
object with specified version numbers.RegExp.RegexException
- if version
is not in the required formatpublic int getMinor()
public void setMinor(int minor)
minor
- public int getMajor()
public void setMajor(int major)
major
- public int getRevision()
public void setRevision(int revision)
revision
- public boolean equals(Object obj)
PluginVersion
's
are equal if their major, minor and revision numbers are equal.public int compareTo(PluginVersion o)
compareTo
in interface Comparable<PluginVersion>
o
- the PluginVersion to compare with this one.0
if this PluginVersion is the same as the specified PluginVersion,
-1
if this PluginVersion is less than the specified PluginVersion and 1
if this PluginVersion is greater than the specified PluginVersion.compareTo(int, int, int)
public int compareTo(int major, int minor, int revision)
major
- major version numberminor
- minor version numberrevision
- revision number0
if this PluginVersion is the same as the specified PluginVersion,
-1
if this PluginVersion is less than the specified PluginVersion and 1
if this PluginVersion is greater than the specified PluginVersion.compareTo(PluginVersion o)
Copyright © 2009-2013. All Rights Reserved.