Package mondrian.util
Class UtilCompatibleJdk16
- java.lang.Object
-
- mondrian.util.UtilCompatibleJdk15
-
- mondrian.util.UtilCompatibleJdk16
-
- All Implemented Interfaces:
UtilCompatible
public class UtilCompatibleJdk16 extends UtilCompatibleJdk15
Implementation ofUtilCompatiblethat 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.voidcancelStatement(Statement stmt)Cancels and closes a SQL Statement object.<T> TcompileScript(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:UtilCompatibleCompiles a script to yield a Java interface.- Specified by:
compileScriptin interfaceUtilCompatible- Overrides:
compileScriptin 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:UtilCompatibleCancels and closes a SQL Statement object. If errors are encountered, they should be logged underUtil.- Specified by:
cancelStatementin interfaceUtilCompatible- Overrides:
cancelStatementin classUtilCompatibleJdk15- Parameters:
stmt- The statement to close.
-
newIdentityHashSet
public <T> Set<T> newIdentityHashSet()
Description copied from interface:UtilCompatibleCreates a hash set that, likeIdentityHashMap, compares keys using identity.- Specified by:
newIdentityHashSetin interfaceUtilCompatible- Overrides:
newIdentityHashSetin 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:UtilCompatibleAsArrays.binarySearch(Object[], int, int, Object), but available pre-JDK 1.6.- Specified by:
binarySearchin interfaceUtilCompatible- Overrides:
binarySearchin classUtilCompatibleJdk15
-
-