|
org.netbeans.modules.j2eeserver/4 1.89.0 1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.netbeans.modules.j2ee.deployment.common.api.Version
public final class Version
Represents the generic version. Useful for libraries, products etc.
This class is Immutable.
| Method Summary | |
|---|---|
boolean |
equals(Object obj)
|
static Version |
fromDottedNotationWithFallback(String version)
Creates the version from the spec version string. |
static Version |
fromJsr277NotationWithFallback(String version)
Creates the version from the spec version string. |
static Version |
fromJsr277OrDottedNotationWithFallback(String version)
Creates the version from the spec version string. |
Integer |
getMajor()
Returns the major number. |
Integer |
getMicro()
Returns the micro number. |
Integer |
getMinor()
Returns the minor number. |
String |
getQualifier()
Returns the qualifier. |
Integer |
getUpdate()
Returns the update. |
int |
hashCode()
|
boolean |
isAboveOrEqual(Version other)
|
boolean |
isBelowOrEqual(Version other)
|
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Method Detail |
|---|
@NonNull
public static Version fromJsr277OrDottedNotationWithFallback(@NonNull
String version)
MAJOR_NUMBER[.MINOR_NUMBER[.MICRO_NUMBER[.UPDATE_NUMBER]]][-QUALIFIER]
or MAJOR_NUMBER[.MINOR_NUMBER[.MICRO_NUMBER[.UPDATE_NUMBER[.QUALIFIER]]]]
or GENERIC_VERSION_STRING. The string is evaluated in this order.
version - spec version string
@NonNull
public static Version fromJsr277NotationWithFallback(@NonNull
String version)
MAJOR_NUMBER[.MINOR_NUMBER[.MICRO_NUMBER[.UPDATE_NUMBER]]][-QUALIFIER]
or GENERIC_VERSION_STRING.
version - spec version string with the following format:
MAJOR_NUMBER[.MINOR_NUMBER[.MICRO_NUMBER[.UPDATE_NUMBER]]][-QUALIFIER]
or GENERIC_VERSION_STRING
@NonNull
public static Version fromDottedNotationWithFallback(@NonNull
String version)
MAJOR_NUMBER[.MINOR_NUMBER[.MICRO_NUMBER[.UPDATE_NUMBER[.QUALIFIER]]]]
or GENERIC_VERSION_STRING.
version - spec version string with the following format:
MAJOR_NUMBER[.MINOR_NUMBER[.MICRO_NUMBER[.UPDATE_NUMBER[.QUALIFIER]]]]
or GENERIC_VERSION_STRING@CheckForNull public Integer getMajor()
null.
null@CheckForNull public Integer getMinor()
null.
null@CheckForNull public Integer getMicro()
null.
null@CheckForNull public Integer getUpdate()
null.
null@CheckForNull public String getQualifier()
null.
nullpublic boolean equals(Object obj)
Two versions are equal if and only if they have same major, minor, micro, update number and qualifier. If the version does not conform to notation the versions are equal only if the version strings exactly matches.
equals in class Objectpublic int hashCode()
The implementation consistent with equals(Object).
hashCode in class Objectpublic boolean isAboveOrEqual(Version other)
public boolean isBelowOrEqual(Version other)
public String toString()
toString in class Object
|
org.netbeans.modules.j2eeserver/4 1.89.0 1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||