1 package com.sharkysoft.util; 2 3 /*** 4 * This class is a wrapper around an Integer object which allows the Integer object to be changed. 5 * It can be used where an "out" parameter is required in a method class. 6 * @author Gareth Boden 7 */ 8 public class MutableInteger extends Number { 9 Integer value; 10 11 public MutableInteger(Integer value) { 12 this.value = value; 13 } 14 15 public Integer getValue() { 16 return value; 17 } 18 19 public void setValue(Integer value) { 20 this.value = value; 21 } 22 23 public int intValue() { 24 return value.intValue(); 25 } 26 27 public long longValue() { 28 return value.longValue(); 29 } 30 31 public float floatValue() { 32 return value.floatValue(); 33 } 34 35 public double doubleValue() { 36 return value.doubleValue(); 37 } 38 }