Package org.libreplan.business.calendars.entities.AvailabilityTimeLine

Examples of org.libreplan.business.calendars.entities.AvailabilityTimeLine.IVetoer


    public void doingAnORDoesAnOrForAdditionalConstraints() {
        boolean[][] validities = { { true, true }, { true, false },
                { false, true }, { false, false } };
        for (final boolean[] pairs : validities) {
            AvailabilityTimeLine a = AvailabilityTimeLine.allValid();
            a.setVetoer(new IVetoer() {

                @Override
                public boolean isValid(LocalDate date) {
                    return pairs[0];
                }
            });
            AvailabilityTimeLine b = AvailabilityTimeLine.allValid();
            b.setVetoer(new IVetoer() {

                @Override
                public boolean isValid(LocalDate date) {
                    return pairs[1];
                }
View Full Code Here


    public void doingAnAndIntersectsTheAdditionalConstraints() {
        boolean[][] validities = { { true, true }, { true, false },
                { false, true }, { false, false } };
        for (final boolean[] pairs : validities) {
            AvailabilityTimeLine a = AvailabilityTimeLine.allValid();
            a.setVetoer(new IVetoer() {

                @Override
                public boolean isValid(LocalDate date) {
                    return pairs[0];
                }
            });
            AvailabilityTimeLine b = AvailabilityTimeLine.allValid();
            b.setVetoer(new IVetoer() {

                @Override
                public boolean isValid(LocalDate date) {
                    return pairs[1];
                }
View Full Code Here

        addInvaliditiesFromEmptyDaysInCalendarDatas(result);
    }

    private void addInvaliditiesFromEmptyDaysInCalendarDatas(
            AvailabilityTimeLine result) {
        result.setVetoer(new IVetoer() {

            @Override
            public boolean isValid(LocalDate date) {
                return canWorkOn(date);
            }
View Full Code Here

TOP

Related Classes of org.libreplan.business.calendars.entities.AvailabilityTimeLine.IVetoer

Copyright © 2018 www.massapicom. 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.