Examples of asDurationOn()


Examples of org.libreplan.business.calendars.entities.ResourceCalendar.asDurationOn()

        // Generate last day assignment
        PartialDay firstDay = new PartialDay(IntraDayDate.startOfDay(date),
                IntraDayDate.create(date, hours(endTime.getHour())));
        EffortDuration effortCanAllocate = min(totalIntended,
                calendar.asDurationOn(firstDay, ONE_RESOURCE_PER_DAY));
        if (effortCanAllocate.compareTo(zero()) > 0) {
            DayAssignment dayAssignment = createDayAssignment(
                    resourceAllocation, resource, date, effortCanAllocate);
            totalIntended = totalIntended.minus(addDayAssignment(result,
                    dayAssignment));
View Full Code Here

Examples of org.libreplan.business.calendars.entities.ResourceCalendar.asDurationOn()

        }

        // Generate rest of day assignments
        for (date = date.minusDays(1); totalIntended.compareTo(zero()) > 0; date = date
                .minusDays(1)) {
            EffortDuration duration = min(totalIntended, calendar.asDurationOn(
                    PartialDay.wholeDay(date), ONE_RESOURCE_PER_DAY));
            DayAssignment dayAssigment = createDayAssignment(
                    resourceAllocation, resource, date, duration);
            totalIntended = totalIntended.minus(addDayAssignment(result,
                    dayAssigment));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.