1 4 package com.tc.util; 5 6 9 public class SettableIntValue extends SettableValue { 10 11 public SettableIntValue() { 12 super(); 13 } 14 15 public void setInt(int value) { 16 super.set(new Integer (value)); 17 } 18 19 public int intValue() { 20 return intValue(0); 21 } 22 23 public int intValue(int defaultValue) { 24 if (isSet()) { 25 Integer i = (Integer ) value(); 26 return i.intValue(); 27 } else { 28 return defaultValue; 29 } 30 } 31 32 public Object clone() { 33 SettableIntValue out = new SettableIntValue(); 34 if (this.isSet()) out.set(this.value()); 35 return out; 36 } 37 } | Popular Tags |