Package org.zkoss.zats.mimic.impl
Class Util
- java.lang.Object
-
- org.zkoss.zats.mimic.impl.Util
-
public class Util extends Object
Utilities for implementation.- Author:
- pao
-
-
Constructor Summary
Constructors Constructor Description Util()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static booleancheckVersion(String startVersion, String endVersion)check the given version range is match current ZK version or not.static voidclose(Closeable r)close resource without any exception.static StringgenerateRandomString()static BigIntegergetZKVersion()static booleanhasClass(String className)static booleanisZKVersion(int primaryVer)static BigIntegerparseVersion(String version)parse ZK version to uniform number for compare.
-
-
-
Method Detail
-
getZKVersion
public static BigInteger getZKVersion()
-
isZKVersion
public static boolean isZKVersion(int primaryVer)
-
hasClass
public static boolean hasClass(String className)
-
checkVersion
public static boolean checkVersion(String startVersion, String endVersion)
check the given version range is match current ZK version or not. it accepts wildcard "*". e.g * or 5.0.* or 6.*.*
-
close
public static void close(Closeable r)
close resource without any exception.- Parameters:
r- resource. If null, do nothing.
-
parseVersion
public static BigInteger parseVersion(String version)
parse ZK version to uniform number for compare. the method design for normal version string, but it will still parse as long as possible.- Parameters:
version- ZK version string.- Returns:
- uniform number or null if failed to parse.
-
generateRandomString
public static String generateRandomString()
-
-