if (filterPersons.isEmpty()) {
if (filterPersonsName.isEmpty()) { return filterPersonsName; } else if (filterPersons.isEmpty()) {
    private List<IPerson> filterPersons(List<IPerson> persons, String username, String email,            String name, String documentIdNumber, String[] nameWords) {        List<IPerson> filterPersons = new ArrayList<IPerson>();        List<IPerson> filterPersonsName = new ArrayList<IPerson>();        List<IPerson> filterPersonsEmail = new ArrayList<IPerson>();        List<IPerson> filterPersonsBI = new ArrayList<IPerson>();        List<IPerson> filterPersonsUsername = new ArrayList<IPerson>();        if (email != null && !email.trim().equals("")) {            email = normalize(email.trim());            for (IPerson person : persons) {                if (person.getEmail() != null) {                    String personEmail = normalize(person.getEmail().trim());                    if (personEmail.indexOf(email) != -1) {                        filterPersonsEmail.add(person);                    }                }            }            filterPersons.addAll(filterPersonsEmail);        }        if (username != null && !username.trim().equals("")) {            username = normalize(username.trim());            for (IPerson person : persons) {                if (person.getUsername() != null) {                    String personUserName = normalize(person.getUsername().trim());                    if (personUserName.indexOf(username) != -1) {                        filterPersonsUsername.add(person);                    }                }            }            if (filterPersons.isEmpty()) {                filterPersons.addAll(filterPersonsUsername);            } else if (!filterPersonsUsername.isEmpty()) {                filterPersons = (List<IPerson>) CollectionUtils.intersection(filterPersons,                        filterPersonsUsername);            }        }        if (name != null && !name.equals("")) {            filterPersonsName = getValidPersons(nameWords, persons);            if (filterPersons.isEmpty()) {                filterPersons.addAll(filterPersonsName);            } else if (!filterPersonsName.isEmpty()) {                filterPersons = (List<IPerson>) CollectionUtils.intersection(filterPersons,                        filterPersonsName);            }        }        if (documentIdNumber != null && !documentIdNumber.trim().equals("")) {            documentIdNumber = normalize(documentIdNumber.trim());            for (IPerson person : persons) {                               if (person.getNumeroDocumentoIdentificacao() != null && person.getNome() != null) {                    String personBI = normalize(person.getNumeroDocumentoIdentificacao().trim());                    if (personBI.trim().indexOf(documentIdNumber.trim()) != -1) {                        filterPersonsBI.add(person);                    }                }            }            if (filterPersons.isEmpty()) {                filterPersons.addAll(filterPersonsBI);            } else if (!filterPersonsBI.isEmpty()) {                filterPersons = (List<IPerson>) CollectionUtils.intersection(filterPersons,                        filterPersonsBI);            }        }                List<IPerson> totalPersons = new ArrayList<IPerson>();        for (IPerson person : filterPersons) {            if(person.getUsername() != null && person.getUsername().indexOf("INA") == -1){                totalPersons.add(person);            }        }                return totalPersons;    }