class ShardingValueWrapper {

    public Date dateValue(final String format) throws ParseException {
        if (value instanceof Number) {
            return new Date(((Number) value).longValue());
        }
        if (value instanceof Date) {
            return (Date) value;
        }
        Preconditions.checkArgument(!Strings.isNullOrEmpty(format));
        return new SimpleDateFormat(format).parse(value.toString());
    }

    public  ShardingValueWrapper(final Comparable<?> value);

}