Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Hour {
- private[this] var h: Int = _
- def hour: Int = h
- def hour_=(x: Int) {
- require(0<=x && x<24)
- h = x
- }
- }
- defined class Hour
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement