mondrian.util
Class UtilCompatibleJdk14

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

public class UtilCompatibleJdk14
extends Object
implements UtilCompatible

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.

Since:
Feb 5, 2007
Author:
jhyde
 

Constructor Summary
UtilCompatibleJdk14()
           
 
Method Summary
<E extends Enum<E>>
Set<E>
enumSetAllOf(Class<E> elementType)
           
<E extends Enum<E>>
Set<E>
enumSetNoneOf(Class<E> elementType)
           
<E extends Enum<E>>
Set<E>
enumSetOf(E first, E... rest)
           
<T> T
getAnnotation(Method method, String annotationClassName, T defaultValue)
           
 BigDecimal makeBigDecimalFromDouble(double d)
          This generates a BigDecimal that can have a precision that does not reflect the precision of the input double.
 String quotePattern(String s)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UtilCompatibleJdk14

public UtilCompatibleJdk14()
Method Detail

enumSetOf

public <E extends Enum<E>> Set<E> enumSetOf(E first,
                                            E... rest)
Specified by:
enumSetOf in interface UtilCompatible

enumSetNoneOf

public <E extends Enum<E>> Set<E> enumSetNoneOf(Class<E> elementType)
Specified by:
enumSetNoneOf in interface UtilCompatible

enumSetAllOf

public <E extends Enum<E>> Set<E> enumSetAllOf(Class<E> elementType)
Specified by:
enumSetAllOf in interface UtilCompatible

makeBigDecimalFromDouble

public BigDecimal makeBigDecimalFromDouble(double d)
This generates a BigDecimal that can have a precision that does not reflect the precision of the input double.

Specified by:
makeBigDecimalFromDouble in interface UtilCompatible
Parameters:
d - input double
Returns:
BigDecimal

quotePattern

public String quotePattern(String s)
Specified by:
quotePattern in interface UtilCompatible

getAnnotation

public <T> T getAnnotation(Method method,
                           String annotationClassName,
                           T defaultValue)
Specified by:
getAnnotation in interface UtilCompatible

SourceForge.net_Logo