if ((point.getIntervalAttributes().contains(DomainConstants.WORKED_ATTRIBUTES) == false) && point.getIntervalAttributes().contains(AttributeType.MEAL)  && (mealInterval[0].isBefore(point) || mealInterval[0].isAtSameTime(point)) && scheduleMealBreakInterval.contains(point.getTime(), false)) {      startMealBreakPoint = point;
if (point.getIntervalAttributes().contains(DomainConstants.WORKED_ATTRIBUTES) == false) { if (point.getIntervalAttributes().contains(AttributeType.MEAL) || (point.isBefore(mealInterval[0]) && !point.equals(firstPoint))) { startMealBreakPoint = point; }
    public TimePoint findStartLunchBreak(TimeInterval scheduleMealBreakInterval) {        List<TimePoint> workedPointsList = getAllAttributePoints(DomainConstants.WORKED_ATTRIBUTES);        TimePoint[] mealInterval = findIntervalByAttribute(AttributeType.MEAL);        TimePoint startMealBreakPoint = null;        for (TimePoint point : workedPointsList) {            // ponto esta dentro do intervalo de refeicao            if ((point.getIntervalAttributes().contains(DomainConstants.WORKED_ATTRIBUTES) == false)                    && point.getIntervalAttributes().contains(AttributeType.MEAL)                    // && point.getTime().isAfter(mealInterval.getStartTime())                    && (mealInterval[0].isBefore(point) || mealInterval[0].isAtSameTime(point))                    && scheduleMealBreakInterval.contains(point.getTime(), false)) {                //System.out.println("ponto" + point.toString());                // check if the employee nao trabalhou apenas dentro do periodo de almoco                // TimeInterval workedIntervalBeforeMeal =                // findIntervalByAttribute(point.getPointAttributes().intersects(DomainConstants.WORKED_ATTRIBUTES));                // //System.out.println(workedIntervalBeforeMeal.toString());                startMealBreakPoint = point;                // if (workedIntervalBeforeMeal.getStartTime().isBefore(mealInterval.getStartTime())) {                // startMealBreakPoint = point;                // //System.out.println("point" + point.toString());                // break;                // } else {                // // startMealBreakPoint =                // }            }        }        // NAO SE APLICA PQ O FUNCIONARIO TEM DE IR ALMOCAR NO INTERVALO        // // Se nao foi encontrado nenhum ponto pode haver a hipotese do funcionario ter ido almocar        // antes do intervalo de almoco        // if (startMealBreakPoint == null) {        // int workedPointsListSize = workedPointsList.size();        // for (int i = workedPointsListSize; i < 0; i--) {        // TimePoint point = workedPointsList.get(i);        // if ((point.getIntervalAttributes().contains(DomainConstants.WORKED_ATTRIBUTES) == false) &&        // (point.getIntervalAttributes().contains(AttributeType.MEAL) == false)        // && point.getPoint().isBefore(mealInterval.getStartTime())) {        // startMealBreakPoint = point;        // break;        // }        // }        // }        return startMealBreakPoint;    }