Class IntegerCache

java.lang.Object
org.ka2ddo.util.IntegerCache

public class IntegerCache extends Object
This class implements a cache similar to the java.lang.Integer class, but for a wider range, so as to reduce the number of duplicate-valued Integer wrapper objects cluttering up the heap.
Author:
Andrew Pavlin, KA2DDO
  • Method Details

    • valueOf

      public static Integer valueOf(int v)
      Get an Integer object corresponding to the specified primitive value, using the cache
      Parameters:
      v - int value to wrap
      Returns:
      Integer object with the value of v