001    package net.sf.cpsolver.studentsct.model;
002    
003    import java.util.Set;
004    import java.util.Vector;
005    
006    import net.sf.cpsolver.coursett.model.TimeLocation;
007    
008    /**
009     * Time and room assignment. This can be either {@link Section} or {@link FreeTimeRequest}.
010     * <br><br>
011     * 
012     * @version
013     * StudentSct 1.1 (Student Sectioning)<br>
014     * Copyright (C) 2007 Tomáš Müller<br>
015     * <a href="mailto:muller@unitime.org">muller@unitime.org</a><br>
016     * Lazenska 391, 76314 Zlin, Czech Republic<br>
017     * <br>
018     * This library is free software; you can redistribute it and/or
019     * modify it under the terms of the GNU Lesser General Public
020     * License as published by the Free Software Foundation; either
021     * version 2.1 of the License, or (at your option) any later version.
022     * <br><br>
023     * This library is distributed in the hope that it will be useful,
024     * but WITHOUT ANY WARRANTY; without even the implied warranty of
025     * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
026     * Lesser General Public License for more details.
027     * <br><br>
028     * You should have received a copy of the GNU Lesser General Public
029     * License along with this library; if not, write to the Free Software
030     * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
031     */
032    public interface Assignment {
033        /** Time assignment */
034        public TimeLocation getTime();
035        /** Room assignment 
036         * @return list of {@link net.sf.cpsolver.coursett.model.RoomLocation}
037         */
038        public Vector getRooms();
039        /** Number of rooms in which a section meets */
040        public int getNrRooms();
041        
042        /** True, if this assignment is overlapping in time and space with the given assignment. */
043        public boolean isOverlapping(Assignment assignment);
044        /** True, if this assignment is overlapping in time and space with the given set of assignments. */
045        public boolean isOverlapping(Set assignments);
046        
047        /** Enrollment with this assignmnet was assigned to a {@link Request}. */
048        public void assigned(Enrollment enrollment);
049        /** Enrollment with this assignmnet was unassigned from a {@link Request}. */
050        public void unassigned(Enrollment enrollment);
051        /** Return the list of assigned enrollments that contains this assignment.*/
052        public Set getEnrollments();
053    }