mondrian.util
Class UtilCompatibleJdk16

java.lang.Object
  extended by mondrian.util.UtilCompatibleJdk15
      extended by mondrian.util.UtilCompatibleJdk16
All Implemented Interfaces:
UtilCompatible

public class UtilCompatibleJdk16
extends UtilCompatibleJdk15

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
UtilCompatibleJdk16()
           
 
Method Summary
<T extends Comparable<T>>
int
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.
<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, like IdentityHashMap, compares keys using identity.
 
Methods inherited from class mondrian.util.UtilCompatibleJdk15
generateUuidString, getAnnotation, getMemoryInfo, makeBigDecimalFromDouble, newTimer, quotePattern, threadLocalRemove
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UtilCompatibleJdk16

public UtilCompatibleJdk16()
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 interface UtilCompatible
Overrides:
compileScript in class UtilCompatibleJdk15
Type Parameters:
T - Interface
Parameters:
iface - Interface script should implement
script - Script code
engineName - Name of engine (e.g. "JavaScript")
Returns:
Object that implements given interface

cancelAndCloseStatement

public void cancelAndCloseStatement(Statement stmt)
Description copied from interface: UtilCompatible
Cancels and closes a SQL Statement object. If errors are encountered, they should be logged under Util.

Specified by:
cancelAndCloseStatement in interface UtilCompatible
Overrides:
cancelAndCloseStatement in class UtilCompatibleJdk15
Parameters:
stmt - The statement to close.

newIdentityHashSet

public <T> Set<T> newIdentityHashSet()
Description copied from interface: UtilCompatible
Creates a hash set that, like IdentityHashMap, compares keys using identity.

Specified by:
newIdentityHashSet in interface UtilCompatible
Overrides:
newIdentityHashSet in class UtilCompatibleJdk15
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
As Arrays.binarySearch(Object[], int, int, Object), but available pre-JDK 1.6.

Specified by:
binarySearch in interface UtilCompatible
Overrides:
binarySearch in class UtilCompatibleJdk15

Get Mondrian at SourceForge.net. Fast, secure and free Open Source software downloads