Class Version
- java.lang.Object
-
- uk.co.caprica.vlcj.support.version.Version
-
- All Implemented Interfaces:
Comparable<Version>
public final class Version extends Object implements Comparable<Version>
Encapsulation of version information and related behaviours.This may be useful to implement version-specific features.
This implementation is not exhaustive, but is good enough for the known vlc versions.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
atLeast(Version required)
Test whether or not this version is at least the required version.int
compareTo(Version o)
String
extra()
Get the extra.int
major()
Get the major version.int
minor()
Get the minor version.int
revision()
Get the revision.String
toString()
String
version()
Get the original version string.
-
-
-
Constructor Detail
-
Version
public Version(String version)
Create a new version.- Parameters:
version
- version string
-
-
Method Detail
-
version
public String version()
Get the original version string.- Returns:
- version
-
major
public int major()
Get the major version.- Returns:
- major version number
-
minor
public int minor()
Get the minor version.- Returns:
- minor version number
-
revision
public int revision()
Get the revision.- Returns:
- revision number
-
extra
public String extra()
Get the extra.- Returns:
- extra
-
atLeast
public boolean atLeast(Version required)
Test whether or not this version is at least the required version.- Parameters:
required
- required version- Returns:
true
if this version is at least (equal to or greater than) the required version
-
compareTo
public int compareTo(Version o)
- Specified by:
compareTo
in interfaceComparable<Version>
-
-