| java.lang.Object org.java.plugin.registry.Version
Field Summary | |
final public static char | SEPARATOR Version identifier parts separator. |
Constructor Summary | |
public | Version(int aMajor, int aMinor, int aBuild, String aName) Creates version identifier object from given parts. |
SEPARATOR | final public static char SEPARATOR(Code) | | Version identifier parts separator.
|
Version | public Version(int aMajor, int aMinor, int aBuild, String aName)(Code) | | Creates version identifier object from given parts. No validation
performed during object instantiation, all values become parts of
version identifier as they are.
Parameters: aMajor - major version number Parameters: aMinor - minor version number Parameters: aBuild - build number Parameters: aName - build name, null value becomes empty string |
getBuild | public int getBuild()(Code) | | build number |
getMajor | public int getMajor()(Code) | | major version number |
getMinor | public int getMinor()(Code) | | minor version number |
isCompatibleWith | public boolean isCompatibleWith(Version other)(Code) | | Compares two version identifiers for compatibility.
A version identifier is considered to be compatible if its major
component equals to the argument major component, and its minor component
is greater than or equal to the argument minor component.
If the minor components are equal, than the build component of the
version identifier must be greater than or equal to the build component
of the argument identifier.
Parameters: other - the other version identifier true if this version identifieris compatible with the given version identifier, andfalse otherwise |
isEquivalentTo | public boolean isEquivalentTo(Version other)(Code) | | Compares two version identifiers for equivalency.
Two version identifiers are considered to be equivalent if their major
and minor components equal and are at least at the same build level
as the argument.
Parameters: other - the other version identifier true if this version identifieris equivalent to the given version identifier, andfalse otherwise |
isGreaterOrEqualTo | public boolean isGreaterOrEqualTo(Version other)(Code) | | Compares two version identifiers to see if this one is
greater than or equal to the argument.
A version identifier is considered to be greater than or equal
if its major component is greater than the argument major
component, or the major components are equal and its minor component
is greater than the argument minor component, or the
major and minor components are equal and its build component is
greater than the argument build component, or all components are equal.
Parameters: other - the other version identifier true if this version identifieris compatible with the given version identifier, andfalse otherwise |
isGreaterThan | public boolean isGreaterThan(Version other)(Code) | | Compares two version identifiers for order using multi-decimal
comparison.
Parameters: other - the other version identifier true if this version identifieris greater than the given version identifier, andfalse otherwise |
parse | public static Version parse(String str)(Code) | | Parses given string as version identifier. All missing parts will be
initialized to 0 or empty string. Parsing starts from left side of the
string.
Parameters: str - version identifier as string version identifier object |
toString | public String toString()(Code) | | Returns the string representation of this version identifier.
The result satisfies
version.equals(new Version(version.toString())) .
the string representation of this version identifier |
|
|