net.sf.cpsolver.coursett.model
Class RoomLocation

java.lang.Object
  extended by net.sf.cpsolver.coursett.model.RoomLocation
All Implemented Interfaces:
Comparable

public class RoomLocation
extends Object
implements Comparable

Room part of placement.

Version:
CourseTT 1.1 (University Course Timetabling)
Copyright (C) 2006 Tomáš Müller
muller@unitime.org
Lazenska 391, 76314 Zlin, Czech Republic

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA

Constructor Summary
RoomLocation(Long id, String name, Long bldgId, int preference, int size, int x, int y, boolean ignoreTooFar, RoomConstraint rc)
          Constructor
 
Method Summary
 int compareTo(Object o)
           
 boolean equals(Object o)
           
 Long getBuildingId()
          Building id
 double getDistance(RoomLocation roomLocation)
           
 Long getId()
          Room id
 boolean getIgnoreTooFar()
           
 String getName()
          Room name
 int getPosX()
          X-position of the building
 int getPosY()
          Y-position of the building
 int getPreference()
          Room preference
 RoomConstraint getRoomConstraint()
           
 int getRoomSize()
          Room size
 int hashCode()
           
 void setCoordinates(int x, int y)
          Position of the building
 void setPreference(int preference)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RoomLocation

public RoomLocation(Long id,
                    String name,
                    Long bldgId,
                    int preference,
                    int size,
                    int x,
                    int y,
                    boolean ignoreTooFar,
                    RoomConstraint rc)
Constructor

Parameters:
id - room id
name - room name
bldgId - building id
preference - soft preference
size - room size
x - x-position of the building
y - y-position of the building
Method Detail

getId

public Long getId()
Room id


getBuildingId

public Long getBuildingId()
Building id


getName

public String getName()
Room name


getPreference

public int getPreference()
Room preference


setPreference

public void setPreference(int preference)

getRoomSize

public int getRoomSize()
Room size


setCoordinates

public void setCoordinates(int x,
                           int y)
Position of the building


getPosX

public int getPosX()
X-position of the building


getPosY

public int getPosY()
Y-position of the building


getIgnoreTooFar

public boolean getIgnoreTooFar()

getRoomConstraint

public RoomConstraint getRoomConstraint()

toString

public String toString()
Overrides:
toString in class Object

equals

public boolean equals(Object o)
Overrides:
equals in class Object

getDistance

public double getDistance(RoomLocation roomLocation)

compareTo

public int compareTo(Object o)
Specified by:
compareTo in interface Comparable

hashCode

public int hashCode()
Overrides:
hashCode in class Object