org.jibx.binding.util
Class IntegerCache

java.lang.Object
  extended by org.jibx.binding.util.IntegerCache

public abstract class IntegerCache
extends java.lang.Object

Cache of Integer values. This is designed on the assumption that clients will start with zero and work their way up from there. By holding created instances in an array it allows for full reuse.

Version:
1.0
Author:
Dennis M. Sosnoski

Field Summary
private static java.lang.Integer[] s_integers
          Initial set of index values supported.
 
Constructor Summary
IntegerCache()
           
 
Method Summary
static java.lang.Integer getInteger(int value)
          Get Integer for value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

s_integers

private static java.lang.Integer[] s_integers
Initial set of index values supported.

Constructor Detail

IntegerCache

public IntegerCache()
Method Detail

getInteger

public static java.lang.Integer getInteger(int value)
Get Integer for value.

Parameters:
value - non-negative integer value
Returns:
corresponding Integer value


Project Web Site