Created
May 28, 2022 05:44
-
-
Save aqua30/b846fe33e3ad076be06d16dc40c622a7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
data class TimeData( | |
val hours: TimeUnit = TimeUnit(), | |
val mins: TimeUnit = TimeUnit(), | |
val secs: TimeUnit = TimeUnit(), | |
) { | |
fun isDataFull() = hours.leftDigit > 0 | |
fun isDataEmpty() = | |
hours.leftDigit == 0 && hours.rightDigit == 0 | |
&& mins.leftDigit == 0 && mins.rightDigit == 0 | |
&& secs.leftDigit == 0 && secs.rightDigit == 0 | |
fun isHoursHalfFull() = hours.leftDigit == 0 && hours.rightDigit > 0 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment