public class UtilCompatibleJdk16 extends UtilCompatibleJdk15
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.
Constructor and Description |
---|
UtilCompatibleJdk16() |
Modifier and Type | Method and Description |
---|---|
<T extends Comparable<T>> |
binarySearch(T[] ts,
int start,
int end,
T t)
As
Arrays.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, like
IdentityHashMap ,
compares keys using identity. |
generateUuidString, getAnnotation, getMemoryInfo, makeBigDecimalFromDouble, newTimer, quotePattern, threadLocalRemove
public <T> T compileScript(Class<T> iface, String script, String engineName)
UtilCompatible
compileScript
in interface UtilCompatible
compileScript
in class UtilCompatibleJdk15
T
- Interfaceiface
- Interface script should implementscript
- Script codeengineName
- Name of engine (e.g. "JavaScript")public void cancelStatement(Statement stmt)
UtilCompatible
Util
.cancelStatement
in interface UtilCompatible
cancelStatement
in class UtilCompatibleJdk15
stmt
- The statement to close.public <T> Set<T> newIdentityHashSet()
UtilCompatible
IdentityHashMap
,
compares keys using identity.newIdentityHashSet
in interface UtilCompatible
newIdentityHashSet
in class UtilCompatibleJdk15
T
- Element typepublic <T extends Comparable<T>> int binarySearch(T[] ts, int start, int end, T t)
UtilCompatible
Arrays.binarySearch(Object[], int, int, Object)
, but
available pre-JDK 1.6.binarySearch
in interface UtilCompatible
binarySearch
in class UtilCompatibleJdk15
Copyright © 2019 Hitachi Vantara. All rights reserved.