@Test public void testOrthogonalization() { List<CoordinateTimeAbstract> coords = new ArrayList<>(); coords.add(makeTimeCoordinate(startDate, 12, 6)); coords.add(makeTimeCoordinate(startDate, 4, 24)); CoordinateTimeAbstract result = CoordinateTime2DUnionizer.testOrthogonal(coords); Formatter f = new Formatter(System.out); f.format("Original%n"); for (CoordinateTimeAbstract coord : coords) { coord.showInfo(f, new Indent(2)); } f.format("%nResult%n"); if (result == null) f.format("not orthogonal"); else result.showInfo(f, new Indent(2)); Assert.assertNull(result); }
@Nullable static CoordinateTimeAbstract testOrthogonal(Collection<CoordinateTimeAbstract> times) { CoordinateTimeAbstract maxCoord = null; Set<Object> result = new HashSet<>(100); int max = 0; for (CoordinateTimeAbstract coord : times) { if (max < coord.getSize()) { maxCoord = coord; max = coord.getSize(); } result.addAll(coord.getValues()); } int totalMax = result.size(); return totalMax == max ? maxCoord : null; }
CoordinateTime2DUnionizer extends CoordinateBuilderImpl<T> { @Nullable static CoordinateTimeAbstract testOrthogonal(Collection<CoordinateTimeAbstract> times) { CoordinateTimeAbstract maxCoord = null; Set<Object> result = new HashSet<>(100); int max = 0; for (CoordinateTimeAbstract coord : times) { if (max < coord.getSize()) { maxCoord = coord; max = coord.getSize(); } result.addAll(coord.getValues()); } int totalMax = result.size(); return totalMax == max ? maxCoord : null; } }
CoordinateTime2DUnionizer extends CoordinateBuilderImpl<T> { @Nullable static CoordinateTimeAbstract testOrthogonal(Collection<CoordinateTimeAbstract> times) { CoordinateTimeAbstract maxCoord = null; Set<Object> result = new HashSet<>(100); int max = 0; for (CoordinateTimeAbstract coord : times) { if (max < coord.getSize()) { maxCoord = coord; max = coord.getSize(); } result.addAll(coord.getValues()); } int totalMax = result.size(); return totalMax == max ? maxCoord : null; } CoordinateTime2DUnionizer(boolean isTimeInterval, CalendarPeriod timeUnit, int code, boolean makeVals,
      org.slf4j.Logger logger); }
CoordinateTime2DUnionizer extends CoordinateBuilderImpl<T> { @Nullable static CoordinateTimeAbstract testOrthogonal(Collection<CoordinateTimeAbstract> times) { CoordinateTimeAbstract maxCoord = null; Set<Object> result = new HashSet<>(100); int max = 0; for (CoordinateTimeAbstract coord : times) { if (max < coord.getSize()) { maxCoord = coord; max = coord.getSize(); } result.addAll(coord.getValues()); } int totalMax = result.size(); return totalMax == max ? maxCoord : null; } CoordinateTime2DUnionizer(boolean isTimeInterval, CalendarPeriod timeUnit, int code, boolean makeVals,
      org.slf4j.Logger logger); @Override void addAll(Coordinate coord); @Override Object extract(T gr); @Override Coordinate makeCoordinate(List<Object> values); }
CoordinateTime2DUnionizer extends CoordinateBuilderImpl<T> { @Nullable static CoordinateTimeAbstract testOrthogonal(Collection<CoordinateTimeAbstract> times) { CoordinateTimeAbstract maxCoord = null; Set<Object> result = new HashSet<>(100); int max = 0; for (CoordinateTimeAbstract coord : times) { if (max < coord.getSize()) { maxCoord = coord; max = coord.getSize(); } result.addAll(coord.getValues()); } int totalMax = result.size(); return totalMax == max ? maxCoord : null; } CoordinateTime2DUnionizer(boolean isTimeInterval, CalendarPeriod timeUnit, int code, boolean makeVals,
      org.slf4j.Logger logger); @Override void addAll(Coordinate coord); @Override Object extract(T gr); @Override Coordinate makeCoordinate(List<Object> values);  }