Added Course into javadoc

Signed-off-by: Marcin Woźniak <y0rune@aol.com>
This commit is contained in:
Marcin Woźniak 2020-11-27 17:05:47 +01:00
parent 7d5522e413
commit 911f2e54f5
Signed by: y0rune
GPG Key ID: F204C385F57EB348

View File

@ -34,6 +34,16 @@ public class Groups {
public Groups() { public Groups() {
} }
/**
* Groups
*
* @param capacity capacity given to the groups
* @param room room given to the groups
* @param course course given to the groups
* @param time time given to the groups
* @param day day given to the groups
* @param lecturer lecturer given to the groups
*/
public Groups(int capacity, String room, Course course, int time, WeekDay day, Lecturer lecturer) { public Groups(int capacity, String room, Course course, int time, WeekDay day, Lecturer lecturer) {
this.capacity = capacity; this.capacity = capacity;
this.room = room; this.room = room;
@ -44,66 +54,130 @@ public class Groups {
this.type = capacity >= 50 ? GroupType.LECTURE : GroupType.CLASS; this.type = capacity >= 50 ? GroupType.LECTURE : GroupType.CLASS;
} }
/**
* getId
* @return id
*/
public Long getId() { public Long getId() {
return this.id; return this.id;
} }
/**
* getLecturer
* @return lecturer
*/
public Lecturer getLecturer() { public Lecturer getLecturer() {
return lecturer; return lecturer;
} }
/**
* setLecturer
* @param lecturer set lecturer into groups
*/
public void setLecturer(Lecturer lecturer) { public void setLecturer(Lecturer lecturer) {
this.lecturer = lecturer; this.lecturer = lecturer;
} }
/**
* WeekDay
* @return day
*/
public WeekDay getDay() { public WeekDay getDay() {
return day; return day;
} }
/**
* setLecturer
* @param day set day into groups
*/
public void setDay(WeekDay day) { public void setDay(WeekDay day) {
this.day = day; this.day = day;
} }
/**
* GroupType
* @return type
*/
public GroupType getType() { public GroupType getType() {
return type; return type;
} }
/**
* setType
* @param type set type into groups
*/
public void setType(GroupType type) { public void setType(GroupType type) {
this.type = type; this.type = type;
} }
/**
* getCapacity
* @return capacity
*/
public int getCapacity() { public int getCapacity() {
return capacity; return capacity;
} }
/**
* setCapacity
* @param capacity set capacity into groups
*/
public void setCapacity(int capacity) { public void setCapacity(int capacity) {
this.capacity = capacity; this.capacity = capacity;
} }
/**
* getRoom
* @return room
*/
public String getRoom() { public String getRoom() {
return room; return room;
} }
/**
* setRoom
* @param room set room into groups
*/
public void setRoom(String room) { public void setRoom(String room) {
this.room = room; this.room = room;
} }
/**
* getTime
* @return time
*/
public int getTime() { public int getTime() {
return time; return time;
} }
/**
* setTime
* @param time set time into groups
*/
public void setTime(int time) { public void setTime(int time) {
this.time = time; this.time = time;
} }
/**
* getCourseId
* @return course
*/
public Course getCourseId() { public Course getCourseId() {
return course; return course;
} }
/**
* setCourseId
* @param courseId set courseId into groups
*/
public void setCourseId(Course courseId) { public void setCourseId(Course courseId) {
this.course = courseId; this.course = courseId;
} }
/**
* getTimeString
* @return time as formated String
*/
public String getTimeString() { public String getTimeString() {
int minutes = this.getTime() % 60; int minutes = this.getTime() % 60;
String hoursString = Integer.toString(this.getTime() / 60); String hoursString = Integer.toString(this.getTime() / 60);