AttributeType pointWorkedAttribute = point.getPointAttributes().intersects(DomainConstants.WORKED_ATTRIBUTES); if (pointWorkedAttribute != null) { if (isPointStartingAttributeInterval(point, pointWorkedAttribute) && (point.getPoint().isBefore(endPoint.getPoint()) || point.getPoint().equals(endPoint.getPoint()))) { return point; }
AttributeType pointWorkedAttribute = point.getPointAttributes().intersects( DomainConstants.WORKED_ATTRIBUTES); if (pointWorkedAttribute != null) { if (isPointStartingAttributeInterval(point, pointWorkedAttribute) && (point.isBefore(endPoint) || point.isAtSameTime(endPoint))) { return point;
    private TimePoint findWorkedStartPointBetweenPoints(TimePoint startPoint, TimePoint endPoint) {        int startPosition = getTimePoints().indexOf(startPoint);        int timelineSize = getNumberOfTimePoints();        for (int i = startPosition; i < timelineSize; i++) {            TimePoint point = getTimeLinePosition(i);            // worked is never overlapped to another worked, so if it's a worked point it's unique            AttributeType pointWorkedAttribute = point.getPointAttributes().intersects(DomainConstants.WORKED_ATTRIBUTES);                if (pointWorkedAttribute != null) {                    if (isPointStartingAttributeInterval(point, pointWorkedAttribute) && (point.getPoint().isBefore(endPoint.getPoint()) ||                             point.getPoint().equals(endPoint.getPoint()))) {                        return point;                    }                }        }        return null;    }