private List<RegionInfo> getRegionsOfTable(TableName table, Predicate<RegionStateNode> filter) {
    return getTableRegionStateNodes(table).stream().filter(filter).map(n -> n.getRegionInfo())
      .collect(Collectors.toList());
  }
Returns Return the regions of the table and filter them.
hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/RegionStates.java