if (function.isInherentFunction()) {
if (function.isInherentFunction() && ((this.getListingTypeValueToFunctionsHidden().getValue().toString().equals("0") && function .isActive(currentDate)) || (this.getListingTypeValueToFunctionsHidden() .getValue().toString().equals("1") && !function.isActive(currentDate)))) {
    public List<IFunction> getAllInherentFunctions() throws FenixFilterException, FenixServiceException {        List<IFunction> allInherentFunctions = new ArrayList<IFunction>();        for (IFunction function : this.getUnit().getFunctions()) {            if (function.isInherentFunction()) {                allInherentFunctions.add(function);            }        }        return allInherentFunctions;    }