private static List<RegionInfo>
    getListOfRegionInfos(final List<Pair<RegionInfo, ServerName>> pairs) {
    if (pairs == null || pairs.isEmpty()) {
      return Collections.emptyList();
    }
    List<RegionInfo> result = new ArrayList<>(pairs.size());
    for (Pair<RegionInfo, ServerName> pair : pairs) {
      result.add(pair.getFirst());
    }
    return result;
  }
Gets all of the regions of the specified table. Do not use this method to get meta table
regions, use methods in MetaTableLocator instead.
@param connection                  connection we're using
@param tableName                   table we're looking for
@param excludeOfflinedSplitParents If true, do not include offlined split parents in the
                                   return.
@return Ordered list of {@link RegionInfo}.
hbase-server/src/main/java/org/apache/hadoop/hbase/MetaTableAccessor.java