Package net.openid.appauth.browser
Class DelimitedVersion
- java.lang.Object
-
- net.openid.appauth.browser.DelimitedVersion
-
- All Implemented Interfaces:
Comparable<DelimitedVersion>
public class DelimitedVersion extends Object implements Comparable<DelimitedVersion>
Represents a delimited version number for an application.This can parse common version number formats, treating any sequence of non-numeric characters as a delimiter, and discards these to retain just the numeric content for comparison. Trailing zeroes in a version number are discarded to produce a compact, canonical representation. Empty versions are equivalent to “0”. Each numeric part is expected to fit within a 64-bit integer.
-
-
Constructor Summary
Constructors Constructor Description DelimitedVersion(long[] numericParts)
Creates a version with the specified parts, ordered from major to minor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareTo(DelimitedVersion other)
boolean
equals(Object obj)
int
hashCode()
static DelimitedVersion
parse(String versionString)
Parses a delimited version number from the provided string.String
toString()
-
-
-
Constructor Detail
-
DelimitedVersion
public DelimitedVersion(long[] numericParts)
Creates a version with the specified parts, ordered from major to minor.
-
-
Method Detail
-
compareTo
public int compareTo(@NonNull DelimitedVersion other)
- Specified by:
compareTo
in interfaceComparable<DelimitedVersion>
-
parse
public static DelimitedVersion parse(String versionString)
Parses a delimited version number from the provided string.
-
-