org.openorb.util
Class NumberCache

java.lang.Object
  |
  +--org.openorb.util.NumberCache

public final class NumberCache
extends Object

A utility class for obtaining Number instances. The following system properties are used to configure the cache:
Key Value
openorb.cache.disable Set this to false to disable all caching. Note that this also disables Character caching.
openorb.cache.short.min The min (inclusive) Short value to cache (default -128).
openorb.cache.short.max The max (inclusive) Short value to cache (default 127).
openorb.cache.integer.min The min (inclusive) Integer value to cache (default -128).
openorb.cache.integer.max The max (inclusive) Integer value to cache (default 127).
openorb.cache.long.min The min (inclusive) Long value to cache (default -128).
openorb.cache.long.max The max (inclusive) Long value to cache (default 127).

Note that all Byte values are cached unless caching is disabled.

Version:
$Revision: 1.5 $ $Date: 2004/06/23 07:13:19 $
Author:
Richard G Clark
See Also:
CharacterCache

Method Summary
static Byte getByte(byte value)
          Gets the Byte instance for the specifed value.
static Double getDouble(double value)
          Gets the Double instance for the specifed value.
static Float getFloat(float value)
          Gets the Float instance for the specifed value.
static Integer getInteger(int value)
          Gets the Integer instance for the specifed value.
static Long getLong(long value)
          Gets the Long instance for the specifed value.
static Short getShort(short value)
          Gets the Short instance for the specifed value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getByte

public static Byte getByte(byte value)
Gets the Byte instance for the specifed value.
Parameters:
value - the value for the object
Returns:
the Byte instance

getShort

public static Short getShort(short value)
Gets the Short instance for the specifed value.
Parameters:
value - the value for the object
Returns:
the Short instance

getInteger

public static Integer getInteger(int value)
Gets the Integer instance for the specifed value.
Parameters:
value - the value for the object
Returns:
the Integer instance

getLong

public static Long getLong(long value)
Gets the Long instance for the specifed value.
Parameters:
value - the value for the object
Returns:
the Long instance

getFloat

public static Float getFloat(float value)
Gets the Float instance for the specifed value.
Parameters:
value - the value for the object
Returns:
the Float instance

getDouble

public static Double getDouble(double value)
Gets the Double instance for the specifed value.
Parameters:
value - the value for the object
Returns:
the Double instance