public List<String> generateAllRacks(Collection<UpstreamInfo> upstreams) {
    List<String> allRacks = new ArrayList<>();
    for (UpstreamInfo upstreamInfo : upstreams) {
      if (upstreamInfo.getRackId().isPresent()) {
        allRacks.add(upstreamInfo.getRackId().get());
      }
    }
    return allRacks;
  }
public List < String > generateAllRacks ( Collection < UpstreamInfo > upstreams ) { List < String > allRacks = new ArrayList < > ( ) ; for ( UpstreamInfo upstreamInfo : upstreams ) { if ( upstreamInfo . getRackId ( ) . isPresent ( ) ) { allRacks . add ( upstreamInfo . getRackId ( ) . get ( ) ) ; } } return allRacks ; }
@return the rack ids of all the upstreams