public class Substitution extends Object implements Cloneable
SubstitutionSchedule| Constructor and Description |
|---|
Substitution() |
Substitution(Substitution substitution,
Set<String> classes)
Creates a copy of a substitution with a different set of classes
|
| Modifier and Type | Method and Description |
|---|---|
Substitution |
clone() |
boolean |
equals(Object o) |
boolean |
equalsExcludingClasses(Object o)
Check if this substitution equals another one, but excluding the classes.
|
boolean |
equalsExcludingPreviousTeachers(Object o)
Check if this substitution equals another one, but excluding the previous teachers.
|
boolean |
equalsExcludingTeachers(Object o)
Check if this substitution equals another one, but excluding the teachers.
|
boolean |
equalsExcludingType(Object o)
Check if this substitution equals another one, but excluding the type.
|
Set<String> |
getClasses()
Get the classes this substitution applies for
|
String |
getColor()
Get the color in which this substitution should be shown on the schedule as hexadecimal representation (such
as
#FF0000 for red). |
String |
getDesc()
Get an additional description of this substitution, such as "tasks on page 42" or "moved to 6th lesson."
|
String |
getLesson()
Get the lesson which this substitution is for.
|
String |
getPreviousAndCurrentTeacherText() |
String |
getPreviousRoom()
Get the room in which this lesson would have been taught according to the regular schedule.
|
String |
getPreviousSubject()
Get the subject that would have been taught in this lesson according to the regular schedule.
|
String |
getPreviousTeacher()
Get the teacher who would have given this lesson according to the regular schedule.
|
Set<String> |
getPreviousTeachers()
Get the teachers who would have given this lesson according to the regular schedule.
|
String |
getRoom()
Get the room in which this lesson will be taught.
|
String |
getSubject()
Get the subject that will be taught in this lesson.
|
String |
getSubstitutionFrom()
Get the "substitution from" ("Vertr. von") value.
|
String |
getTeacher()
Get the teacher giving this lesson.
|
Set<String> |
getTeachers()
Get the teachers giving this lesson.
|
String |
getTeacherText() |
String |
getTeacherTo()
Get the "teacher to" ("(Le.) nach") value.
|
String |
getText() |
String |
getType()
Get the type of this substitution.
|
int |
hashCode() |
void |
setClasses(Set<String> classes)
Set the classes this substitution applies for.
|
void |
setColor(String color)
Set the color in which this substitution should be shown on the schedule as hexadecimal representation (such
as
#FF0000 for red). |
void |
setDesc(String desc)
Set an additional description of this substitution, such as "tasks on page 42" or "moved to 6th lesson."
|
void |
setLesson(String lesson)
Set the lesson which this substitution is for.
|
void |
setPreviousRoom(String previousRoom)
Set the room in which this lesson would have been taught according to the regular schedule.
|
void |
setPreviousSubject(String previousSubject)
Set the subject that would have been taught in this lesson according to the regular schedule.
|
void |
setPreviousTeacher(String previousTeacher)
Set the teacher who would have given this lesson according to the regular schedule.
|
void |
setPreviousTeachers(Set<String> previousTeachers)
Set the teachers who would have given this lesson according to the regular schedule.
|
void |
setRoom(String room)
Set the room in which this lesson will be taught.
|
void |
setSubject(String subject)
Set the subject that will be taught in this lesson.
|
void |
setSubstitutionFrom(String substitutionFrom)
Set the "substitution from" ("Vertr. von") value.
|
void |
setTeacher(String teacher)
Set the teacher giving this lesson.
|
void |
setTeachers(Set<String> teachers)
Set the teachers giving this lesson.
|
void |
setTeacherTo(String teacherTo)
Set the "teacher to" ("(Le.) nach") value.
|
void |
setType(String type)
Set the type of this substitution.
|
String |
toString() |
String |
toString(SubstitutionSchedule.Type type)
Get a string representation of the substitution, using different wording depending on the type.
|
public Substitution()
public Substitution(Substitution substitution, Set<String> classes)
substitution - the substitution to copyclasses - the set of classes to usepublic String getText()
public String getTeacherText()
getPreviousAndCurrentTeacherText(), type and
lesson)public String getPreviousAndCurrentTeacherText()
public Set<String> getClasses()
public void setClasses(Set<String> classes)
classes - the classes to setpublic String getLesson()
public void setLesson(String lesson)
lesson - the lessonpublic String getType()
public void setType(String type)
type - the type to setpublic String getSubject()
public void setSubject(String subject)
subject - the subject to setpublic String getPreviousSubject()
public void setPreviousSubject(String previousSubject)
previousSubject - the previous subject to setpublic String getTeacher()
getTeachers().public Set<String> getTeachers()
public void setTeacher(String teacher)
setTeachers(Set) instead.teacher - the teacher to setpublic void setTeachers(Set<String> teachers)
teachers - the teachers to setpublic String getPreviousTeacher()
getPreviousTeachers().public Set<String> getPreviousTeachers()
public void setPreviousTeacher(String previousTeacher)
setPreviousTeachers(Set) instead.previousTeacher - the previous teacher to setpublic void setPreviousTeachers(Set<String> previousTeachers)
previousTeachers - the previous teachers to setpublic String getRoom()
public void setRoom(String room)
room - the room to setpublic String getPreviousRoom()
public void setPreviousRoom(String previousRoom)
previousRoom - the previous room to setpublic String getDesc()
public void setDesc(String desc)
desc - the description to setpublic String getColor()
#FF0000 for red).public void setColor(String color)
#FF0000 for red). Normally, this should only be done by
ColorProvider.
Required.color - the color to setpublic String getSubstitutionFrom()
public void setSubstitutionFrom(String substitutionFrom)
substitutionFrom - the substitution from to setpublic String getTeacherTo()
public void setTeacherTo(String teacherTo)
teacherTo - the teacher to to setpublic boolean equalsExcludingType(Object o)
o - the substitution (or other object) to comparepublic boolean equalsExcludingClasses(Object o)
o - the substitution (or other object) to comparepublic boolean equalsExcludingTeachers(Object o)
o - the substitution (or other object) to comparepublic boolean equalsExcludingPreviousTeachers(Object o)
o - the substitution (or other object) to comparepublic String toString(SubstitutionSchedule.Type type)
type - the type of the SubstitutionSchedule. Affects the format in which the fields are outputpublic Substitution clone() throws CloneNotSupportedException
clone in class ObjectCloneNotSupportedException