@Override
    public Result evaluate(TaskRequest taskRequest, VirtualMachineCurrentState targetVM, TaskTrackerState taskTrackerState) {
        String targetHostAttrVal = getAttrValue(targetVM.getCurrAvailableResources());
        if(targetHostAttrVal==null || targetHostAttrVal.isEmpty()) {
            return new Result(false, hostAttributeName + " attribute unavailable on host " + targetVM.getCurrAvailableResources().hostname());
        }
        String requiredAttrVal = hostAttributeValueGetter.call(taskRequest.getId());
        return targetHostAttrVal.equals(requiredAttrVal)?
                new Result(true, "") :
                new Result(false, "Host attribute " + hostAttributeName + ": required=" + requiredAttrVal + ", got=" + targetHostAttrVal);
    }
@Override
    public Result evaluate(TaskRequest taskRequest, VirtualMachineCurrentState targetVM, TaskTrackerState taskTrackerState) {
        String targetHostAttrVal = getAttrValue(targetVM.getCurrAvailableResources());
        if(targetHostAttrVal==null || targetHostAttrVal.isEmpty()) {
            return new Result(false, hostAttributeName + " attribute unavailable on host " + targetVM.getCurrAvailableResources().hostname());
        }
        String requiredAttrVal = hostAttributeValueGetter.call(taskRequest.getId());
        return targetHostAttrVal.equals(requiredAttrVal)?
                new Result(true, "") :
                new Result(false, "Host attribute " + hostAttributeName + ": required=" + requiredAttrVal + ", got=" + targetHostAttrVal);
    }
@ Override public Result evaluate ( TaskRequest taskRequest , VirtualMachineCurrentState targetVM , TaskTrackerState taskTrackerState ) { String targetHostAttrVal = getAttrValue ( targetVM . getCurrAvailableResources ( ) ) ; if ( targetHostAttrVal == null || targetHostAttrVal . isEmpty ( ) ) { return new Result ( false , hostAttributeName + " attribute unavailable on host " + targetVM . getCurrAvailableResources ( ) . hostname ( ) ) ; } String requiredAttrVal = hostAttributeValueGetter . call ( taskRequest . getId ( ) ) ; return targetHostAttrVal . equals ( requiredAttrVal ) ? new Result ( true , "" ) : new Result ( false , "Host attribute " + hostAttributeName + ": required=" + requiredAttrVal + ", got=" + targetHostAttrVal ) ; }
Tests a host to determine whether it has an attribute of the required value for this task request.

@param taskRequest      describes the task being evaluated for assignment to the host
@param targetVM         describes the host being evaluated as a target for the task
@param taskTrackerState describes the state of tasks already assigned or running on hosts throughout the
system
@return a successful Result if the host has an attribute with the required value, or an unsuccessful
Result otherwise
Tests a host to determine whether it has an attribute of the required value for this task request .