public List<MutableShardRouting> shardsWithState(ShardRoutingState... state) {
   List<MutableShardRouting> shards = newArrayList();
   for (RoutingNode routingNode : this) {
     shards.addAll(routingNode.shardsWithState(state));
   }
   return shards;
 }
 public int numberOfShardsOfType(ShardRoutingState state) {
   int count = 0;
   for (RoutingNode routingNode : this) {
     count += routingNode.numberOfShardsWithState(state);
   }
   return count;
 }
 public String prettyPrint() {
   StringBuilder sb = new StringBuilder("routing_nodes:\n");
   for (RoutingNode routingNode : this) {
     sb.append(routingNode.prettyPrint());
   }
   sb.append("---- unassigned\n");
   for (MutableShardRouting shardEntry : unassigned) {
     sb.append("--------").append(shardEntry.shortSummary()).append('\n');
   }
   return sb.toString();
 }