All Downloads are FREE. Search and download functionalities are using the official Maven repository.

it.vige.school.rooms.Room Maven / Gradle / Ivy

There is a newer version: 1.4.0
Show newest version
package it.vige.school.rooms;

import java.io.Serializable;

public class Room implements Serializable {

	private static final long serialVersionUID = 5714119820308270263L;

	private int clazz;

	private char section;
	
	private School school;

	public int getClazz() {
		return clazz;
	}

	public void setClazz(int clazz) {
		this.clazz = clazz;
	}

	public char getSection() {
		return section;
	}

	public void setSection(char section) {
		this.section = section;
	}

	public School getSchool() {
		return school;
	}

	public void setSchool(School school) {
		this.school = school;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + clazz;
		result = prime * result + ((school == null) ? 0 : school.hashCode());
		result = prime * result + section;
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Room other = (Room) obj;
		if (clazz != other.clazz)
			return false;
		if (school == null) {
			if (other.school != null)
				return false;
		} else if (!school.equals(other.school))
			return false;
		if (section != other.section)
			return false;
		return true;
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy