code: static boolean isSorted(Iterable<? extends TimeSeriesCollection> tscIterable) {
          final Iterator<? extends TimeSeriesCollection> iter = tscIterable.iterator();
          if (!iter.hasNext()) return true; // Empty collection is ordered.
  
          DateTime timestamp = iter.next().getTimestamp();
          while (iter.hasNext()) {
              final DateTime nextTimestamp = iter.next().getTimestamp();
              if (!nextTimestamp.isAfter(timestamp)) return false;
              timestamp = nextTimestamp;
          }
          return true;
      }
docs: Validation function, to check if an iterable is sorted with ascending
  timestamps.
  
  @param tscIterable An iterable type.
  @return True iff the iterable is sorted, false otherwise.