boolean evaluateTrigger() throws ScraperException {
            List<Boolean> triggerResultList = new ArrayList<>();
            if(logger.isTraceEnabled()){
                String connString = "empty";
                if(!triggerElementList.isEmpty()) {
                    connString = triggerElementList.get(0).getPlcConnectionString();
                }
                logger.trace("eval values for job {} and {}: {}",triggeredScrapeJobImpl.getJobName(),connString,acquiredValuesList);
            }
            //iterate through all items of acquirement-list
            for(int countElements=0; countElements<acquiredValuesList.size();countElements++){
                TriggerElement triggerElement = triggerElementList.get(countElements);
                Object acquiredObject = acquiredValuesList.get(countElements);
                if(validateDataType(triggerElement.getPlcTag()).equals(Boolean.class)){
                    //if given type is Boolean
                    boolean currentValue;
                    boolean refValue;
                    try{
                        currentValue = (boolean) acquiredObject;
                        refValue = (boolean) triggerElement.getCompareValue();
                    }
                    catch (Exception e){
                        handleException(e);
                        return false;
                    }
                    if(triggerElement.getComparatorType().equals(Comparator.EQUAL)){
                        triggerResultList.add(currentValue == refValue);
                    }
                    else {
                        triggerResultList.add(currentValue != refValue);
                    }
                }
                if(validateDataType(triggerElement.getPlcTag()).equals(Double.class)
                    || validateDataType(triggerElement.getPlcTag()).equals(Integer.class)
                    || validateDataType(triggerElement.getPlcTag()).equals(Long.class)) {
                    //if given type is numerical
                    boolean skipComparison = false; //comparison shall be skipped if previous values was null
                    double currentValue;
                    double refValue = 0;
                    try{

                        if(acquiredObject instanceof Short){
                            currentValue = ((Short) acquiredObject).doubleValue();
                        }
                        else {
                            if (acquiredObject instanceof Integer) {
                                currentValue = ((Integer) acquiredObject).doubleValue();
                            }
                            else {
                                if (acquiredObject instanceof Long) {
                                    currentValue = ((Long) acquiredObject).doubleValue();
                                }
                                else{
                                    if (acquiredObject instanceof Double) {
                                        currentValue = (Double) acquiredObject;
                                    }else {
                                        currentValue = (double) acquiredObject;
                                    }
                                }
                            }

                        }
                        if(triggerElement.getPreviousMode()){
                            if(triggerElement.getCompareValue()==null){
                                triggerElement.setCompareValue(currentValue);
                                triggerElement.setReservedCompareValue(currentValue);
                                triggerResultList.add(true);
                                if(logger.isTraceEnabled()) {
                                    logger.trace("Initially set compare value to {}", currentValue);
                                }
                                skipComparison=true;
                            }
                            else{
                                refValue = (double) triggerElement.getCompareValue();
                            }
                        }
                        else {
                            refValue = (double) triggerElement.getCompareValue();
                        }

                    }
                    catch (Exception e){
                        handleException(e);
                        return false;
                    }

                    boolean triggerResult = false;
                    if(!skipComparison) {
                        switch (triggerElement.getComparatorType()) {
                            case EQUAL:
                                triggerResult = isApproximately(currentValue, refValue, TOLERANCE_FLOATING_EQUALITY);
                                break;
                            case UNEQUAL:
                                triggerResult = !isApproximately(currentValue, refValue, TOLERANCE_FLOATING_EQUALITY);
                                break;
                            case SMALLER:
                                triggerResult = currentValue < refValue;
                                break;
                            case SMALLER_EQUAL:
                                triggerResult = currentValue <= refValue;
                                break;
                            case GREATER:
                                triggerResult = currentValue > refValue;
                                break;
                            case GREATER_EQUAL:
                                triggerResult = currentValue >= refValue;
                                break;
                            default:
                                triggerResult = false;
                        }
                    }

                    if(triggerResult && triggerElement.getPreviousMode()){
                        triggerElement.setReservedCompareValue(currentValue);
                        if(logger.isTraceEnabled()) {
                            logger.trace("Subcondition matched. Previous value: {}, current compare value {} for Job {}",
                                triggerElement.getReservedCompareValue(),
                                triggerElement.getCompareValue(),
                                triggerElement.getTriggerJob());
                        }
                    }
                    triggerResultList.add(triggerResult);

                }

            }
            if(triggerResultList.isEmpty()){
                if(logger.isDebugEnabled()) {
                    logger.debug("No results could be acquired - setting trigger to false");
                }
                return false;
            }
            //check if there is more then one condition for trigger
            if(triggerResultList.size()>1) {
                if(logger.isTraceEnabled()) {
                    logger.trace("{}", triggerResultList);
                }
                boolean combinedResult=triggerResultList.get(0);
                for (int countElements = 1; countElements < acquiredValuesList.size(); countElements++) {
                    switch (triggerElementList.get(countElements).getConcatType()){
                        case AND:
                            combinedResult = combinedResult && triggerResultList.get(countElements);
                            break;
                        case OR:
                            combinedResult = combinedResult || triggerResultList.get(countElements);
                            break;
                        default:
                            //should not happen
                            combinedResult = false;
                    }
                }
                if(combinedResult) {
                    triggerElementList.forEach(TriggerElement::overrideCompareValue);
                }
                return combinedResult;
            }
            else{
                if(triggerResultList.get(0)) {
                    triggerElementList.forEach(TriggerElement::overrideCompareValue);
                }
                //return first result because its the only one
                return triggerResultList.get(0);
            }
        }
does the evaluation of the trigger conditions are met
//ToDo refactor this to improve readability
@return true if trigger conditions are met, false otherwise
@throws ScraperException if something went wrong
plc4j/tools/scraper/src/main/java/org/apache/plc4x/java/scraper/triggeredscraper/triggerhandler/TriggerConfiguration.java