static boolean securedMatches(Jvm jvm, JvmSearchCriterias criterias) {
        boolean partialMatching = false;

        for (JvmSearchCriteria criteria : criterias.getAll()) {
            String value = criteria.getValue();

            switch (criteria.getBy()) {

                case VMNAME:
                    Pattern pattern = Pattern.compile(value);
                    Matcher matcher = pattern.matcher(jvm.getName());
                    partialMatching = matcher.matches();
                    break;

                case VMID:
                    partialMatching = jvm.getId().equalsIgnoreCase(value);
                    break;

                case VMSTATE:
                    partialMatching = jvm.getStringState().equalsIgnoreCase(value);
                    break;

                default:
                    return false;

            }

            if (!partialMatching) {
                return false;
            }
        }

        return true;
    }