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