public class BugzillaUtils extends Object
| Constructor and Description |
|---|
BugzillaUtils() |
| Modifier and Type | Method and Description |
|---|---|
static int |
compareVersion(String[] v1,
String[] v2)
Compares versions.
|
static void |
debug(Issue issue)
Debugs an issue in log file.
|
static void |
debugObject(StringBuffer s,
Object o) |
static boolean |
getBoolean(Object o)
Converts the object to a boolean.
|
static Date |
getDate(Object o,
DateFormat format)
Converts the object to a date.
|
static double |
getDouble(Object o)
Converts the object to a double.
|
static int |
getInt(Object o)
Converts the object to an int.
|
static long |
getLong(Object o)
Converts the object to a long.
|
static boolean |
isCompatibleVersion(String minVersion,
String maxVersion,
String version)
Returns true if version is in range of minVersion and maxVersion.
|
static boolean |
isJava6()
Returns true when the runtime is Java 6.
|
static String |
join(String separator,
String[] parts)
Makes a join of a string array.
|
static Date |
parseDate(String s)
Parses the date by trying various formats.
|
public static boolean isCompatibleVersion(String minVersion, String maxVersion, String version)
minVersion - - minimum required version (can be null)maxVersion - - maximum required version (can be null)version - - version to checkpublic static int compareVersion(String[] v1, String[] v2)
v1 - - version 1 divided into separate partsv2 - - version 2 divided into separate partspublic static String join(String separator, String[] parts)
separator - - the string to be used inbetween partsparts - - the parts to joinpublic static void debugObject(StringBuffer s, Object o)
public static int getInt(Object o)
o - object to be convertedpublic static long getLong(Object o)
o - object to be convertedpublic static double getDouble(Object o)
o - object to be convertedpublic static boolean getBoolean(Object o)
o - object to be convertedpublic static Date getDate(Object o, DateFormat format)
o - object to be convertedpublic static boolean isJava6()
public static void debug(Issue issue)
issue - issue to be debuggedpublic static Date parseDate(String s) throws ParseException
s - string to parseParseException - when the date could not be parsedCopyright © 2012. All Rights Reserved.