@Test public void handles_FALSE_MONTH() { XDateRange dateRange = new XDateRange(new LocalDate(2011, 10, 1), new LocalDate(2011, 12, 12), new Period(3, PeriodUnit.MONTH)); when(xDateRangeUtils.getDateRange(xsettings)).thenReturn(dateRange); assertFalse(converter.handles(xsettings)); }
@Override public boolean handles(XSettings xsettings) { Preconditions.checkNotNull(xsettings); XDateRange range = xdateRangeUtils.getDateRange(xsettings); if (range != null && (range.getGap().getUnit().equals(YEAR) && range.getStartDate().getDayOfMonth() == 1 && range.getStartDate().getMonthOfYear() == 1)) { return true; } return false; }
FacetYearPeriodValueConverter implements FacetValueConverter { @Override public boolean handles(XSettings xsettings) { Preconditions.checkNotNull(xsettings); XDateRange range = xdateRangeUtils.getDateRange(xsettings); if (range != null && (range.getGap().getUnit().equals(YEAR) && range.getStartDate().getDayOfMonth() == 1 && range.getStartDate().getMonthOfYear() == 1)) { return true; } return false; } }
FacetYearPeriodValueConverter implements FacetValueConverter { @Override public boolean handles(XSettings xsettings) { Preconditions.checkNotNull(xsettings); XDateRange range = xdateRangeUtils.getDateRange(xsettings); if (range != null && (range.getGap().getUnit().equals(YEAR) && range.getStartDate().getDayOfMonth() == 1 && range.getStartDate().getMonthOfYear() == 1)) { return true; } return false; }  }
FacetYearPeriodValueConverter implements FacetValueConverter { @Override public boolean handles(XSettings xsettings) { Preconditions.checkNotNull(xsettings); XDateRange range = xdateRangeUtils.getDateRange(xsettings); if (range != null && (range.getGap().getUnit().equals(YEAR) && range.getStartDate().getDayOfMonth() == 1 && range.getStartDate().getMonthOfYear() == 1)) { return true; } return false; }  @Override YearPeriod convert(String value, XSettings xsettings); @Override boolean handles(XSettings xsettings); @Autowired void setXdateRangeUtils(XDateRangeUtils xdateRangeUtils); }
FacetYearPeriodValueConverter implements FacetValueConverter { @Override public boolean handles(XSettings xsettings) { Preconditions.checkNotNull(xsettings); XDateRange range = xdateRangeUtils.getDateRange(xsettings); if (range != null && (range.getGap().getUnit().equals(YEAR) && range.getStartDate().getDayOfMonth() == 1 && range.getStartDate().getMonthOfYear() == 1)) { return true; } return false; }  @Override YearPeriod convert(String value, XSettings xsettings); @Override boolean handles(XSettings xsettings); @Autowired void setXdateRangeUtils(XDateRangeUtils xdateRangeUtils);  }