Package mondrian.util
Class UtilCompatibleJdk16
- java.lang.Object
-
- mondrian.util.UtilCompatibleJdk15
-
- mondrian.util.UtilCompatibleJdk16
-
- All Implemented Interfaces:
UtilCompatible
public class UtilCompatibleJdk16 extends UtilCompatibleJdk15
Implementation ofUtilCompatible
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 inUtil
, and not instantiate it at all.- Author:
- jhyde
-
-
Constructor Summary
Constructors Constructor Description UtilCompatibleJdk16()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <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>
newIdentityHashSet()
Creates a hash set that, likeIdentityHashMap
, compares keys using identity.-
Methods inherited from class mondrian.util.UtilCompatibleJdk15
generateUuidString, getAnnotation, getMemoryInfo, makeBigDecimalFromDouble, newTimer, quotePattern, threadLocalRemove
-
-
-
-
Method Detail
-
compileScript
public <T> T compileScript(Class<T> iface, String script, String engineName)
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
public void cancelStatement(Statement stmt)
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
public <T> Set<T> 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
public <T extends Comparable<T>> int binarySearch(T[] ts, int start, int end, T t)
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
-
-