fm.liveswitch.Version Class Reference

SDK Version. More...

Public Member Functions

int getMajor ()
 Gets the major version number. More...
 
int getMinor ()
 Gets the minor version number. More...
 
int getPatch ()
 Gets the patch version number. More...
 
int getRevision ()
 Gets the revision version number. More...
 
boolean isEqualTo (fm.liveswitch.Version version)
 Determines whether this version is equal to the specified version. More...
 
boolean isNewerThan (fm.liveswitch.Version version)
 Determines whether this version is newer than the specified version. More...
 
boolean isNewerThanOrEqualTo (fm.liveswitch.Version version)
 Determines whether this version is newer than or equal to the specified version. More...
 
boolean isOlderThan (fm.liveswitch.Version version)
 Determines whether this version is older than the specified version. More...
 
boolean isOlderThanOrEqualTo (fm.liveswitch.Version version)
 Determines whether this version is older than or equal to the specified version. More...
 
void setMajor (int value)
 Sets the major version number. More...
 
void setMinor (int value)
 Sets the minor version number. More...
 
void setPatch (int value)
 Sets the patch version number. More...
 
void setRevision (int value)
 Sets the revision version number. More...
 
String stringify ()
 Returns a string representation of this version. More...
 
String toString ()
 Returns a string representation of this version. More...
 
 Version ()
 Initializes a new instance of the fm.liveswitch.Version class with default values. More...
 
 Version (String versionString)
 Initializes a new instance of the fm.liveswitch.Version class with the specified version string. More...
 

Static Public Member Functions

static fm.liveswitch.Version parse (String versionString)
 Converts the string representation of a version to its fm.liveswitch.Version equivalent. More...
 
static boolean tryParse (String versionString, fm.liveswitch.Holder< fm.liveswitch.Version > version)
 Tries to convert the string representation of a version to its fm.liveswitch.Version equivalent, and returns a value that indicates whether the conversion succeeded. More...
 

Detailed Description

SDK Version.

Constructor & Destructor Documentation

◆ Version() [1/2]

fm.liveswitch.Version.Version ( )

Initializes a new instance of the fm.liveswitch.Version class with default values.

◆ Version() [2/2]

fm.liveswitch.Version.Version ( String  versionString)

Initializes a new instance of the fm.liveswitch.Version class with the specified version string.

Parameters
versionStringA string representation of the version in the format "major.minor.patch.revision".

Member Function Documentation

◆ getMajor()

int fm.liveswitch.Version.getMajor ( )

Gets the major version number.

◆ getMinor()

int fm.liveswitch.Version.getMinor ( )

Gets the minor version number.

◆ getPatch()

int fm.liveswitch.Version.getPatch ( )

Gets the patch version number.

◆ getRevision()

int fm.liveswitch.Version.getRevision ( )

Gets the revision version number.

◆ isEqualTo()

boolean fm.liveswitch.Version.isEqualTo ( fm.liveswitch.Version  version)

Determines whether this version is equal to the specified version.

Parameters
versionThe version to compare with this version.
Returns
true
if the versions are equal; otherwise,
false
.

◆ isNewerThan()

boolean fm.liveswitch.Version.isNewerThan ( fm.liveswitch.Version  version)

Determines whether this version is newer than the specified version.

A development version (0.0.0.0) is considered newer than all other versions except another development version.

Parameters
versionThe version to compare with this version.
Returns
true
if this version is newer than the specified version; otherwise,
false
.

◆ isNewerThanOrEqualTo()

boolean fm.liveswitch.Version.isNewerThanOrEqualTo ( fm.liveswitch.Version  version)

Determines whether this version is newer than or equal to the specified version.

Parameters
versionThe version to compare with this version.
Returns
true
if this version is newer than or equal to the specified version; otherwise,
false
.

◆ isOlderThan()

boolean fm.liveswitch.Version.isOlderThan ( fm.liveswitch.Version  version)

Determines whether this version is older than the specified version.

A development version (0.0.0.0) is not considered older than any other version.

Parameters
versionThe version to compare with this version.
Returns
true
if this version is older than the specified version; otherwise,
false
.

◆ isOlderThanOrEqualTo()

boolean fm.liveswitch.Version.isOlderThanOrEqualTo ( fm.liveswitch.Version  version)

Determines whether this version is older than or equal to the specified version.

Parameters
versionThe version to compare with this version.
Returns
true
if this version is older than or equal to the specified version; otherwise,
false
.

◆ parse()

static fm.liveswitch.Version fm.liveswitch.Version.parse ( String  versionString)
static

Converts the string representation of a version to its fm.liveswitch.Version equivalent.

Parameters
versionStringA string representation of the version to parse.
Returns
A fm.liveswitch.Version object equivalent to the version contained in , or
null
if the conversion failed.

◆ setMajor()

void fm.liveswitch.Version.setMajor ( int  value)

Sets the major version number.

◆ setMinor()

void fm.liveswitch.Version.setMinor ( int  value)

Sets the minor version number.

◆ setPatch()

void fm.liveswitch.Version.setPatch ( int  value)

Sets the patch version number.

◆ setRevision()

void fm.liveswitch.Version.setRevision ( int  value)

Sets the revision version number.

◆ stringify()

String fm.liveswitch.Version.stringify ( )

Returns a string representation of this version.

Returns
A string representation of this version in the format "major.minor.patch.revision".

◆ toString()

String fm.liveswitch.Version.toString ( )

Returns a string representation of this version.

Returns
A string representation of this version in the format "major.minor.patch.revision".

◆ tryParse()

static boolean fm.liveswitch.Version.tryParse ( String  versionString,
fm.liveswitch.Holder< fm.liveswitch.Version version 
)
static

Tries to convert the string representation of a version to its fm.liveswitch.Version equivalent, and returns a value that indicates whether the conversion succeeded.

Parameters
versionStringA string representation of the version to parse.
versionWhen this method returns, contains the fm.liveswitch.Version equivalent of the version contained in , if the conversion succeeded, or
null
if the conversion failed.
Returns
true
if was converted successfully; otherwise,
false
.