if (isPointClosingAttributeInterval(point, attribute) && (point.getPoint().isBefore(endPoint.getPoint()) || point.getPoint().equals(endPoint.getPoint()))) {
if (isPointClosingAttributeInterval(point, attribute) && (point.isBefore(endPoint) || point.isAtSameTime(endPoint))) {
    private TimePoint findIntervalEndPointBetweenPointsByAttribute(TimePoint startPoint, TimePoint endPoint, AttributeType attribute) {         int startPosition = getTimePoints().indexOf(startPoint);        int timelineSize = getNumberOfTimePoints();        for (int i = startPosition; i < timelineSize; i++) {            TimePoint point = getTimeLinePosition(i);            if (isPointClosingAttributeInterval(point, attribute) && (point.getPoint().isBefore(endPoint.getPoint()) || point.getPoint().equals(endPoint.getPoint()))) {                return point;            }        }        return null;    }