Package weka.core
Class RevisionUtils
- java.lang.Object
-
- weka.core.RevisionUtils
-
public class RevisionUtils extends Object
Contains utility functions for handling revisions.- Version:
- $Revision$
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classRevisionUtils.TypeEnumeration of source control types.
-
Constructor Summary
Constructors Constructor Description RevisionUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Stringextract(String s)Extracts the revision string.static Stringextract(RevisionHandler handler)Extracts the revision string returned by the RevisionHandler.static RevisionUtils.TypegetType(String revision)Determines the type of a (sanitized) revision string.static RevisionUtils.TypegetType(RevisionHandler handler)Determines the type of a (sanitized) revision string returned by the RevisionHandler.static voidmain(String[] args)For testing only.
-
-
-
Method Detail
-
extract
public static String extract(RevisionHandler handler)
Extracts the revision string returned by the RevisionHandler.- Parameters:
handler- the RevisionHandler to get the revision for- Returns:
- the actual revision string
-
extract
public static String extract(String s)
Extracts the revision string.- Parameters:
s- the string to get the revision string from- Returns:
- the actual revision string
-
getType
public static RevisionUtils.Type getType(RevisionHandler handler)
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
public static RevisionUtils.Type getType(String revision)
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:
extract(String)
-
-