private List<Coordinate> testIsRegular() {

    // group time coords by offset hour
    Map<Integer, List<CoordinateTimeAbstract>> hourMap = new TreeMap<>();
    for (CoordinateTimeAbstract coord : timeMap.values()) {
      CalendarDate runDate = coord.getRefDate();
      int hour = runDate.getHourOfDay();
      List<CoordinateTimeAbstract> hg = hourMap.computeIfAbsent(hour, k -> new ArrayList<>());
      hg.add(coord);
    }

    // see if each offset hour is orthogonal
    List<Coordinate> result = new ArrayList<>();
    for (int hour : hourMap.keySet()) {
      List<CoordinateTimeAbstract> hg = hourMap.get(hour);
      Coordinate maxCoord = testOrthogonal(hg);
      if (maxCoord == null) return ImmutableList.of();
      result.add(maxCoord);
    }
    return result;
  }
private List < Coordinate > testIsRegular ( ) { Map < Integer , List < CoordinateTimeAbstract > > hourMap = new TreeMap < > ( ) ; for ( CoordinateTimeAbstract coord : timeMap . values ( ) ) { CalendarDate runDate = coord . getRefDate ( ) ; int hour = runDate . getHourOfDay ( ) ; List < CoordinateTimeAbstract > hg = hourMap . computeIfAbsent ( hour , k -> new ArrayList < > ( ) ) ; hg . add ( coord ) ; } List < Coordinate > result = new ArrayList < > ( ) ; for ( int hour : hourMap . keySet ( ) ) { List < CoordinateTimeAbstract > hg = hourMap . get ( hour ) ; Coordinate maxCoord = testOrthogonal ( hg ) ; if ( maxCoord == null ) return ImmutableList . of ( ) ; result . add ( maxCoord ) ; } return result ; }
regular means that all the times for each offset from 0Z can be made into a single time coordinate (FMRC algo)