copy

fun copy(hour: Int = this.hour, minute: Int = this.minute, second: Int = this.second, nanosecond: Int = this.nanosecond): Time

Returns a copy of this time with the values of any individual components replaced by the new values specified.

Throws

if the resulting time is invalid