|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectmondrian.util.UtilCompatibleJdk14
public class UtilCompatibleJdk14
Implementation of UtilCompatible which runs in
JDK 1.4.
The code uses JDK 1.5 constructs such as generics and for-each loops,
but retroweaver can convert these. It does not use
java.util.EnumSet, which is important, because retroweaver has
trouble with this.
| Constructor Summary | |
|---|---|
UtilCompatibleJdk14()
|
|
| Method Summary | ||
|---|---|---|
|
binarySearch(T[] ts,
int start,
int end,
T t)
As Arrays.binarySearch(Object[], int, int, Object), but
available pre-JDK 1.6. |
|
void |
cancelAndCloseStatement(Statement stmt)
Cancels and closes a SQL Statement object. |
|
|
compileScript(Class<T> iface,
String script,
String engineName)
Compiles a script to yield a Java interface. |
|
String |
generateUuidString()
|
|
static String |
generateUuidStringStatic()
|
|
|
getAnnotation(Method method,
String annotationClassName,
T defaultValue)
|
|
Util.MemoryInfo |
getMemoryInfo()
Creates an object from which to get information about system memory use. |
|
BigDecimal |
makeBigDecimalFromDouble(double d)
This generates a BigDecimal that can have a precision that does not reflect the precision of the input double. |
|
|
newIdentityHashSet()
Creates a hash set that, like IdentityHashMap,
compares keys using identity. |
|
Timer |
newTimer(String name,
boolean isDaemon)
Equivalent to Timer.Timer(String, boolean). |
|
String |
quotePattern(String s)
|
|
|
threadLocalRemove(ThreadLocal<T> threadLocal)
Removes a thread local from the current thread. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public UtilCompatibleJdk14()
| Method Detail |
|---|
public BigDecimal makeBigDecimalFromDouble(double d)
makeBigDecimalFromDouble in interface UtilCompatibled - input double
public String quotePattern(String s)
quotePattern in interface UtilCompatible
public <T> T getAnnotation(Method method,
String annotationClassName,
T defaultValue)
getAnnotation in interface UtilCompatiblepublic String generateUuidString()
generateUuidString in interface UtilCompatiblepublic static String generateUuidStringStatic()
public <T> T compileScript(Class<T> iface,
String script,
String engineName)
UtilCompatible
compileScript in interface UtilCompatibleT - Interfaceiface - Interface script should implementscript - Script codeengineName - Name of engine (e.g. "JavaScript")
public <T> void threadLocalRemove(ThreadLocal<T> threadLocal)
UtilCompatibleFrom JDK 1.5 onwards, calls ThreadLocal.remove(); before
that, no-ops.
threadLocalRemove in interface UtilCompatibleT - TypethreadLocal - Thread localpublic Util.MemoryInfo getMemoryInfo()
UtilCompatibleMemoryPoolMXBean.
getMemoryInfo in interface UtilCompatible
public Timer newTimer(String name,
boolean isDaemon)
UtilCompatibleTimer.Timer(String, boolean).
(Introduced in JDK 1.5.)
newTimer in interface UtilCompatiblename - the name of the associated threadisDaemon - true if the associated thread should run as a daemon
public void cancelAndCloseStatement(Statement stmt)
UtilCompatibleUtil.
cancelAndCloseStatement in interface UtilCompatiblestmt - The statement to close.public <T> Set<T> newIdentityHashSet()
UtilCompatibleIdentityHashMap,
compares keys using identity.
newIdentityHashSet in interface UtilCompatibleT - Element type
public <T extends Comparable<T>> int binarySearch(T[] ts,
int start,
int end,
T t)
UtilCompatibleArrays.binarySearch(Object[], int, int, Object), but
available pre-JDK 1.6.
binarySearch in interface UtilCompatible
|
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||