Package weka.core
Class Version
java.lang.Object
weka.core.Version
- All Implemented Interfaces:
Comparable<String>
,RevisionHandler
This class contains the version number of the current WEKA release and some
methods for comparing another version string. The normal layout of a version
string is "MAJOR.MINOR.REVISION", but it can also handle partial version
strings, e.g. "3.4".
Should be used e.g. in exports to XML for keeping track, with which version of WEKA the file was produced.
Should be used e.g. in exports to XML for keeping track, with which version of WEKA the file was produced.
- Version:
- $Revision: 10203 $
- Author:
- FracPete (fracpete at waikato dot ac dot nz)
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
checks the version of this class against the given version-stringboolean
whether the given version string is equal to this versionReturns the revision string.boolean
checks whether this version is newer than the one from the given version stringboolean
checks whether this version is older than the one from the given version stringstatic void
only for testingtoString()
returns the current version as string
-
Field Details
-
VERSION_FILE
the version file- See Also:
-
MAJOR
public static int MAJORthe major version -
MINOR
public static int MINORthe minor version -
REVISION
public static int REVISIONthe revision -
POINT
public static int POINTpoint revision -
SNAPSHOT
public static boolean SNAPSHOTTrue if snapshot -
VERSION
the complete version
-
-
Constructor Details
-
Version
public Version()
-
-
Method Details
-
compareTo
checks the version of this class against the given version-string- Specified by:
compareTo
in interfaceComparable<String>
- Parameters:
o
- the version-string to compare with- Returns:
- -1 if this version is less, 0 if equal and +1 if greater than the provided version
-
equals
whether the given version string is equal to this version -
isOlder
checks whether this version is older than the one from the given version string- Parameters:
o
- the version-string to compare with- Returns:
- TRUE if this version is older than the given one
-
isNewer
checks whether this version is newer than the one from the given version string- Parameters:
o
- the version-string to compare with- Returns:
- TRUE if this version is newer than the given one
-
toString
returns the current version as string -
getRevision
Returns the revision string.- Specified by:
getRevision
in interfaceRevisionHandler
- Returns:
- the revision
-
main
only for testing- Parameters:
args
- the commandline arguments - ignored
-