Number number = (Number) object;
value = formatter.formatNumber(number);
} else if (object instanceof Date) {
Date date = (Date) object;
value = hasTimeComponent(date) ?
formatter.formatDateTime(date) :
formatter.formatDate(date);
} else {
value = object.toString();
}
}