@Test public void testGetCenterUTC() { final ProductData.UTC centerTime1 = SolarFluxCorrectionFactorCalculator.getCenterUTC(time1, time2); final ProductData.UTC centerTime2 = SolarFluxCorrectionFactorCalculator.getCenterUTC(time2, time1); assertEquals("04-JAN-2000 12:00:00.000000", time1.format()); assertEquals("06-JAN-2000 12:00:00.000000", time2.format()); assertEquals("05-JAN-2000 12:00:00.000000", centerTime1.format()); assertEquals("05-JAN-2000 12:00:00.000000", centerTime2.format()); }
public static ProductData.UTC getCenterUTC(ProductData.UTC start, ProductData.UTC end) { final long startMillis = start.getAsDate().getTime(); final long endMillis = end.getAsDate().getTime(); final long diff = endMillis - startMillis; final Date centerDate = new Date(startMillis + diff / 2); return ProductData.UTC.create(centerDate, 0); }
SolarFluxCorrectionFactorCalculator { public static ProductData.UTC getCenterUTC(ProductData.UTC start, ProductData.UTC end) { final long startMillis = start.getAsDate().getTime(); final long endMillis = end.getAsDate().getTime(); final long diff = endMillis - startMillis; final Date centerDate = new Date(startMillis + diff / 2); return ProductData.UTC.create(centerDate, 0); } }
SolarFluxCorrectionFactorCalculator { public static ProductData.UTC getCenterUTC(ProductData.UTC start, ProductData.UTC end) { final long startMillis = start.getAsDate().getTime(); final long endMillis = end.getAsDate().getTime(); final long diff = endMillis - startMillis; final Date centerDate = new Date(startMillis + diff / 2); return ProductData.UTC.create(centerDate, 0); }  }
SolarFluxCorrectionFactorCalculator { public static ProductData.UTC getCenterUTC(ProductData.UTC start, ProductData.UTC end) { final long startMillis = start.getAsDate().getTime(); final long endMillis = end.getAsDate().getTime(); final long diff = endMillis - startMillis; final Date centerDate = new Date(startMillis + diff / 2); return ProductData.UTC.create(centerDate, 0); }  static double computeFactorFor(ProductData.UTC startTime, ProductData.UTC endTime); static double computeFactorFor(ProductData.UTC time); static ProductData.UTC getCenterUTC(ProductData.UTC start, ProductData.UTC end); static synchronized int getNumDaysInTheYear(int year); }
SolarFluxCorrectionFactorCalculator { public static ProductData.UTC getCenterUTC(ProductData.UTC start, ProductData.UTC end) { final long startMillis = start.getAsDate().getTime(); final long endMillis = end.getAsDate().getTime(); final long diff = endMillis - startMillis; final Date centerDate = new Date(startMillis + diff / 2); return ProductData.UTC.create(centerDate, 0); }  static double computeFactorFor(ProductData.UTC startTime, ProductData.UTC endTime); static double computeFactorFor(ProductData.UTC time); static ProductData.UTC getCenterUTC(ProductData.UTC start, ProductData.UTC end); static synchronized int getNumDaysInTheYear(int year);  }