Hamza
09/18/2018, 4:04 AMfun getPeriods(
expression: String? = null,
day: DayOfWeek? = null,
date: Date? = null,
block: Block? = null,
studentID: Int? = null,
studentName: String? = null
): List<Period> = getPeriods().filter { period ->
(if (expression != null) period.expression == expression else true) &&
(if (day != null) period.day == day else true) &&
(if (date != null) period.date == date else true) &&
(if (block != null) period.block == block else true) &&
(if (studentID != null) period.studentID == studentID else true) &&
(if (studentName != null) period.studentName == studentName else true)
}
but i wanna give customisability to allow users to filter by anything they wish