@Test public void format_OneDayPeriod() { DayPeriod value = new DayPeriod(new SimpleLocalDate(new LocalDate(2011, 12, 13)), new SimpleLocalDate(new LocalDate(2011, 12, 13))); assertEquals("13/12/11", formatter.format(value)); }
@Override public String format(Object value) { if (value == null) { return null; } DayPeriod dayPeriod = (DayPeriod)value; if (dayPeriod.isOneDayPeriod()) { return formatDate(dayPeriod.getStartDay()); } return formatDate(dayPeriod.getStartDay()) + "-" + formatDate(dayPeriod.getEndDay()); }
PointDayPeriodValueFormatter extends AbstractPointValueFormatter { @Override public String format(Object value) { if (value == null) { return null; } DayPeriod dayPeriod = (DayPeriod)value; if (dayPeriod.isOneDayPeriod()) { return formatDate(dayPeriod.getStartDay()); } return formatDate(dayPeriod.getStartDay()) + "-" + formatDate(dayPeriod.getEndDay()); } }
PointDayPeriodValueFormatter extends AbstractPointValueFormatter { @Override public String format(Object value) { if (value == null) { return null; } DayPeriod dayPeriod = (DayPeriod)value; if (dayPeriod.isOneDayPeriod()) { return formatDate(dayPeriod.getStartDay()); } return formatDate(dayPeriod.getStartDay()) + "-" + formatDate(dayPeriod.getEndDay()); }  }
PointDayPeriodValueFormatter extends AbstractPointValueFormatter { @Override public String format(Object value) { if (value == null) { return null; } DayPeriod dayPeriod = (DayPeriod)value; if (dayPeriod.isOneDayPeriod()) { return formatDate(dayPeriod.getStartDay()); } return formatDate(dayPeriod.getStartDay()) + "-" + formatDate(dayPeriod.getEndDay()); }  @Override String format(Object value); @Override boolean handles(Class<?> valueClass); @Value("1") @Override void setOrder(int order); }
PointDayPeriodValueFormatter extends AbstractPointValueFormatter { @Override public String format(Object value) { if (value == null) { return null; } DayPeriod dayPeriod = (DayPeriod)value; if (dayPeriod.isOneDayPeriod()) { return formatDate(dayPeriod.getStartDay()); } return formatDate(dayPeriod.getStartDay()) + "-" + formatDate(dayPeriod.getEndDay()); }  @Override String format(Object value); @Override boolean handles(Class<?> valueClass); @Value("1") @Override void setOrder(int order);  }