Package de.timefinder.data

Examples of de.timefinder.data.IntervalLong


        assertEquals(1, instance.getOffset(e2));
    }

     @Test
    public void testSameLengthOverlapping4() {
        IntervalLong e1 = newIntervalLong(0, 2);
        instance.addInterval(e1);
        IntervalLong e2 = newIntervalLong(2, 2);
        instance.addInterval(e2);
        IntervalLong e3 = newIntervalLong(1, 2);
        instance.addInterval(e3);

        assertEquals(2, instance.getMaxAssignments(e1));
        assertEquals(0, instance.getOffset(e1));
View Full Code Here


            pcl.propertyChange(new PropertyChangeEvent(this, ICalendarSettings.CHANGE_ALL, null, null));
        }
    }

    public IntervalLong toInterval(IntervalInt simpleInt) {
        IntervalLong tf = new IntervalLongImpl(toDateTime(simpleInt.getStart()),
                (int) (simpleInt.getDuration()
                * settings.getMillisPerTimeslot() / ICalendarSettings.MINUTE));
        tf.setDescription(simpleInt.getDetails());
        return tf;
    }
View Full Code Here

    @Test
    public void testEventUI() {
        int slots = 8;
        settings.setTimeslotsPerDay(slots);
        settings.setMillisPerTimeslot(ICalendarSettings.HOUR);
        IntervalLong evUI = new IntervalLongImpl(settings.getStartDate().plusHours(slots - 1), 60);

        assertEquals(settings.getStartDate().plusHours(slots - 1),
                evUI.getStartDateTime());
        // should be on the same day
        assertEquals(evUI.getEndDateTime().getDayOfMonth(),
                evUI.getStartDateTime().getDayOfMonth());
    }
View Full Code Here

TOP

Related Classes of de.timefinder.data.IntervalLong

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.