用OO思想优化代码
public Object createCopy(Object source) {
if (source instanceof Integer) {
return new Integer(((Integer)source).intValue());
}
if (source instanceof Long) {
return new Long(((Long)source).longValue());
}
if (source instanceof Float) {
return new Float(((Float)source).floatValue());
}
return null;
}