Package tigase.util
Class Version
java.lang.Object
tigase.util.Version
- All Implemented Interfaces:
Comparable<Version>
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic enumstatic enum -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final EnumSet<Version.FIELD> static final Comparator<Version> static final Version -
Method Summary
Modifier and TypeMethodDescriptionintbooleanintintgetBuild()intgetMajor()intgetMinor()intinthashCode()increment(Version.FIELD field, int amount) Method increments given field by the specified amountbooleanisZero()static VersionSupports both tigase-server-7.2.0-SNAPSHOT-b4895-dist-max.tar.gz and version stringstoString()toString(int padding)
-
Field Details
-
incrementableFields
-
VERSION_COMPARATOR
-
ZERO
-
-
Method Details
-
of
Supports both tigase-server-7.2.0-SNAPSHOT-b4895-dist-max.tar.gz and version strings- Parameters:
str- string to be parsed. Must match the supported formats- Returns:
- a Version object based on the provided string.
- Throws:
IllegalArgumentException- when provided input doesn't match supported formats
-
compareTo
- Specified by:
compareToin interfaceComparable<Version>
-
equals
-
getBaseVersion
-
getBugfix
public int getBugfix() -
getBuild
public int getBuild() -
getCommit
-
getMajor
public int getMajor() -
getMinor
public int getMinor() -
getTypeNumber
public int getTypeNumber() -
getVersionType
-
hashCode
public int hashCode() -
increment
Method increments given field by the specified amount- Parameters:
field- to be incremented - only incrementable fields are supported, i.e. any of theincrementableFields.amount- by which version should be incremented- Returns:
- incremented version if correct field was passed as argument, otherwise same non-incremented version is returned.
- Throws:
IllegalArgumentException
-
isZero
public boolean isZero() -
toString
-
toString
-