}
@Override
public void encode(Type type, StringBuilder buffer, Object val, Context context) throws IOException {
Interval ival = (Interval) val;
buffer.
append("@ ").
append(ival.getYears()).append(" years ").
append(ival.getMonths()).append(" months ").
append(ival.getDays()).append(" days ").
append(ival.getHours()).append(" hours ").
append(ival.getMinutes()).append(" minutes ").
append(format("%f", ival.getSeconds())).append(" seconds");
}