Package mondrian.util
Class UtilCompatibleJdk16
java.lang.Object
mondrian.util.UtilCompatibleJdk15
mondrian.util.UtilCompatibleJdk16
- All Implemented Interfaces:
UtilCompatible
Implementation of
UtilCompatible
that runs in
JDK 1.6.
Prior to JDK 1.6, this class should never be loaded. Applications should
instantiate this class via Class.forName(String)
or better, use
methods in Util
, and not instantiate it at all.
- Author:
- jhyde
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription<T extends Comparable<T>>
intbinarySearch
(T[] ts, int start, int end, T t) AsArrays.binarySearch(Object[], int, int, Object)
, but available pre-JDK 1.6.void
cancelStatement
(Statement stmt) Cancels and closes a SQL Statement object.<T> T
compileScript
(Class<T> iface, String script, String engineName) Compiles a script to yield a Java interface.<T> Set<T>
Creates a hash set that, likeIdentityHashMap
, compares keys using identity.Methods inherited from class mondrian.util.UtilCompatibleJdk15
generateUuidString, getAnnotation, getMemoryInfo, makeBigDecimalFromDouble, newTimer, quotePattern, threadLocalRemove
-
Constructor Details
-
UtilCompatibleJdk16
public UtilCompatibleJdk16()
-
-
Method Details
-
compileScript
Description copied from interface:UtilCompatible
Compiles a script to yield a Java interface.- Specified by:
compileScript
in interfaceUtilCompatible
- Overrides:
compileScript
in classUtilCompatibleJdk15
- Type Parameters:
T
- Interface- Parameters:
iface
- Interface script should implementscript
- Script codeengineName
- Name of engine (e.g. "JavaScript")- Returns:
- Object that implements given interface
-
cancelStatement
Description copied from interface:UtilCompatible
Cancels and closes a SQL Statement object. If errors are encountered, they should be logged underUtil
.- Specified by:
cancelStatement
in interfaceUtilCompatible
- Overrides:
cancelStatement
in classUtilCompatibleJdk15
- Parameters:
stmt
- The statement to close.
-
newIdentityHashSet
Description copied from interface:UtilCompatible
Creates a hash set that, likeIdentityHashMap
, compares keys using identity.- Specified by:
newIdentityHashSet
in interfaceUtilCompatible
- Overrides:
newIdentityHashSet
in classUtilCompatibleJdk15
- Type Parameters:
T
- Element type- Returns:
- Set
-
binarySearch
Description copied from interface:UtilCompatible
AsArrays.binarySearch(Object[], int, int, Object)
, but available pre-JDK 1.6.- Specified by:
binarySearch
in interfaceUtilCompatible
- Overrides:
binarySearch
in classUtilCompatibleJdk15
-