Package weka.core
Class RevisionUtils
java.lang.Object
weka.core.RevisionUtils
Contains utility functions for handling revisions.
- Version:
- $Revision: 8034 $
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
Enumeration of source control types. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
Extracts the revision string.static String
extract
(RevisionHandler handler) Extracts the revision string returned by the RevisionHandler.static RevisionUtils.Type
Determines the type of a (sanitized) revision string.static RevisionUtils.Type
getType
(RevisionHandler handler) Determines the type of a (sanitized) revision string returned by the RevisionHandler.static void
For testing only.
-
Constructor Details
-
RevisionUtils
public RevisionUtils()
-
-
Method Details
-
extract
Extracts the revision string returned by the RevisionHandler.- Parameters:
handler
- the RevisionHandler to get the revision for- Returns:
- the actual revision string
-
extract
Extracts the revision string.- Parameters:
s
- the string to get the revision string from- Returns:
- the actual revision string
-
getType
Determines the type of a (sanitized) revision string returned by the RevisionHandler.- Parameters:
handler
- the RevisionHandler to determine the type for- Returns:
- the type, UNKNOWN if it cannot be determined
-
getType
Determines the type of a (sanitized) revision string. Use extract(String) method to extract the revision first before calling this method.- Parameters:
revision
- the revision to get the type for- Returns:
- the type, UNKNOWN if it cannot be determined
- See Also:
-
main
For testing only. The first parameter must be a classname of a class implementing the weka.core.RevisionHandler interface.- Parameters:
args
- the commandline arguments- Throws:
Exception
- if something goes wrong
-