code: protected boolean checkResourceRequestType(
        List<ResourceRequest> requestList) {
      for (ResourceRequest req: requestList) {
        if (!legalTypeSet.contains(req.type)) {
          return false;
        }
      }
      return true;
    }
docs: Check all the resource requests and ensure that they are legal.
  
  @param requestList List of resource requests to check
  @return True if the resources are legal, false otherwise