code: public boolean isMatching(ResourceProfile required) {
  
  		if (required == UNKNOWN) {
  			return true;
  		}
  
  		if (cpuCores >= required.getCpuCores() &&
  				heapMemoryInMB >= required.getHeapMemoryInMB() &&
  				directMemoryInMB >= required.getDirectMemoryInMB() &&
  				nativeMemoryInMB >= required.getNativeMemoryInMB() &&
  				networkMemoryInMB >= required.getNetworkMemoryInMB()) {
  			for (Map.Entry<String, Resource> resource : required.extendedResources.entrySet()) {
  				if (!extendedResources.containsKey(resource.getKey()) ||
  						!extendedResources.get(resource.getKey()).getResourceAggregateType().equals(resource.getValue().getResourceAggregateType()) ||
  						extendedResources.get(resource.getKey()).getValue() < resource.getValue().getValue()) {
  					return false;
  				}
  			}
  			return true;
  		}
  		return false;
  	}
docs: Check whether required resource profile can be matched.
  
  @param required the required resource profile
  @return true if the requirement is matched, otherwise false