Package org.utplsql.api
Class Version
- java.lang.Object
-
- org.utplsql.api.Version
-
- All Implemented Interfaces:
Comparable<Version>
public class Version extends Object implements Comparable<Version>
Simple class to parse utPLSQL Version-information and provide the separate version-numbers- Author:
- pesse
-
-
Field Summary
Fields Modifier and Type Field Description static VersionLATESTstatic VersionV3_0_0static VersionV3_0_1static VersionV3_0_2static VersionV3_0_3static VersionV3_0_4static VersionV3_1_0static VersionV3_1_1static VersionV3_1_10static VersionV3_1_11static VersionV3_1_12static VersionV3_1_13static VersionV3_1_2static VersionV3_1_3static VersionV3_1_4static VersionV3_1_5static VersionV3_1_6static VersionV3_1_7static VersionV3_1_8static VersionV3_1_9
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(Version o)intcompareTo(Version o, boolean nullMeansEqual)static Versioncreate(String versionString)IntegergetBugfix()IntegergetBuild()IntegergetMajor()IntegergetMinor()StringgetNormalizedString()Returns a normalized form of the parsed version informationbooleanisGreaterOrEqualThan(Version v)Compares this version to a given version and returns true if this version is greater or equal than the given one If one of the version parts of the base version is null, this level is assumed equal no matter the comparing level's version part Throws anInvalidVersionExceptionif either this or the given version are invalidbooleanisGreaterThan(Version v)Compares this version to a given version and returns true if this version is greater than the given one If one of the version parts of the base version is null, this level is assumed equal no matter the comparing level's version part Throws anInvalidVersionExceptionif either this or the given version are invalidbooleanisLessOrEqualThan(Version v)Compares this version to a given version and returns true if this version is less or equal than the given one If one of the version parts of the base version is null, this level is assumed equal no matter the comparing level's version part Throws anInvalidVersionExceptionif either this or the given version are invalidbooleanisLessThan(Version v)Compares this version to a given version and returns true if this version is less than the given one If one of the version parts of the base version is null, this level is assumed equal no matter the comparing level's version part Throws anInvalidVersionExceptionif either this or the given version are invalidbooleanisValid()StringtoString()
-
-
-
Field Detail
-
V3_0_0
public static final Version V3_0_0
-
V3_0_1
public static final Version V3_0_1
-
V3_0_2
public static final Version V3_0_2
-
V3_0_3
public static final Version V3_0_3
-
V3_0_4
public static final Version V3_0_4
-
V3_1_0
public static final Version V3_1_0
-
V3_1_1
public static final Version V3_1_1
-
V3_1_2
public static final Version V3_1_2
-
V3_1_3
public static final Version V3_1_3
-
V3_1_4
public static final Version V3_1_4
-
V3_1_5
public static final Version V3_1_5
-
V3_1_6
public static final Version V3_1_6
-
V3_1_7
public static final Version V3_1_7
-
V3_1_8
public static final Version V3_1_8
-
V3_1_9
public static final Version V3_1_9
-
V3_1_10
public static final Version V3_1_10
-
V3_1_11
public static final Version V3_1_11
-
V3_1_12
public static final Version V3_1_12
-
V3_1_13
public static final Version V3_1_13
-
LATEST
public static final Version LATEST
-
-
Constructor Detail
-
Version
@Deprecated public Version(String versionString)
Deprecated.Usecreate(java.lang.String)factory method instead For removal- Parameters:
versionString- Version as String
-
-
Method Detail
-
isValid
public boolean isValid()
-
getNormalizedString
public String getNormalizedString()
Returns a normalized form of the parsed version information- Returns:
- normalized string
-
compareTo
public int compareTo(Version o)
- Specified by:
compareToin interfaceComparable<Version>
-
compareTo
public int compareTo(Version o, boolean nullMeansEqual)
-
isGreaterOrEqualThan
public boolean isGreaterOrEqualThan(Version v) throws InvalidVersionException
Compares this version to a given version and returns true if this version is greater or equal than the given one If one of the version parts of the base version is null, this level is assumed equal no matter the comparing level's version part Throws anInvalidVersionExceptionif either this or the given version are invalid- Parameters:
v- Version to compare with- Returns:
- true if is greater or equal
- Throws:
InvalidVersionException- If the version does not match
-
isGreaterThan
public boolean isGreaterThan(Version v) throws InvalidVersionException
Compares this version to a given version and returns true if this version is greater than the given one If one of the version parts of the base version is null, this level is assumed equal no matter the comparing level's version part Throws anInvalidVersionExceptionif either this or the given version are invalid- Parameters:
v- Version to compare with- Returns:
- true if is greater
- Throws:
InvalidVersionException- If the version does not match
-
isLessOrEqualThan
public boolean isLessOrEqualThan(Version v) throws InvalidVersionException
Compares this version to a given version and returns true if this version is less or equal than the given one If one of the version parts of the base version is null, this level is assumed equal no matter the comparing level's version part Throws anInvalidVersionExceptionif either this or the given version are invalid- Parameters:
v- Version to compare with- Returns:
- if version is less or equal
- Throws:
InvalidVersionException- If version is invalid
-
isLessThan
public boolean isLessThan(Version v) throws InvalidVersionException
Compares this version to a given version and returns true if this version is less than the given one If one of the version parts of the base version is null, this level is assumed equal no matter the comparing level's version part Throws anInvalidVersionExceptionif either this or the given version are invalid- Parameters:
v- Version to compare with- Returns:
- if version is less
- Throws:
InvalidVersionException- If version is invalid
-
-