Package springfox.documentation.common
Class Version
- java.lang.Object
-
- springfox.documentation.common.Version
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(Version that)booleanequals(java.lang.Object obj)inthashCode()booleanis(Version version)Returns whether the currentVersionis the same as the given one.booleanisGreaterThan(Version version)Returns whether the currentVersionis greater (newer) than the given one.booleanisGreaterThanOrEqualTo(Version version)Returns whether the currentVersionis greater (newer) or the same as the given one.booleanisLessThan(Version version)Returns whether the currentVersionis less (older) than the given one.booleanisLessThanOrEqualTo(Version version)Returns whether the currentVersionis less (older) or equal to the current one.static Versionparse(java.lang.String version)Parses the given string representation of a version into aVersionobject.java.lang.StringtoString()
-
-
-
Constructor Detail
-
Version
public Version(int... parts)
Creates a newVersionfrom the given integer values. At least one value has to be given but a maximum of 4.- Parameters:
parts- must not be null or empty.
-
-
Method Detail
-
parse
public static Version parse(java.lang.String version)
Parses the given string representation of a version into aVersionobject.- Parameters:
version- must not be null or empty.- Returns:
- returns version
-
isGreaterThan
public boolean isGreaterThan(Version version)
Returns whether the currentVersionis greater (newer) than the given one.- Parameters:
version- - candidate version- Returns:
- true or false based on version comparison
-
isGreaterThanOrEqualTo
public boolean isGreaterThanOrEqualTo(Version version)
Returns whether the currentVersionis greater (newer) or the same as the given one.- Parameters:
version- - candidate version- Returns:
- true or false based on version comparison
-
is
public boolean is(Version version)
Returns whether the currentVersionis the same as the given one.- Parameters:
version- - candidate version- Returns:
- true or false based on version comparison
-
isLessThan
public boolean isLessThan(Version version)
Returns whether the currentVersionis less (older) than the given one.- Parameters:
version- - candidate version- Returns:
- true or false based on version comparison
-
isLessThanOrEqualTo
public boolean isLessThanOrEqualTo(Version version)
Returns whether the currentVersionis less (older) or equal to the current one.- Parameters:
version- - candidate version- Returns:
- true or false based on version comparison
-
compareTo
public int compareTo(Version that)
- Specified by:
compareToin interfacejava.lang.Comparable<Version>
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-