Advertisement
Guest User

Untitled

a guest
Dec 16th, 2014
161
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Scala 0.35 KB | None | 0 0
  1. class Time2bb(hour:Int, minute:Int){
  2.     //require(hour>=0 && minute>=0 && hour<24 && minute<60)
  3.   if(hour<0 || hour>23 || minute<0 || minute>59) throw new IllegalArgumentException("blad")
  4.     var ileMinOdPolnocy:Int=hour*60+minute
  5.     def before(other:Time2bb):Boolean=
  6.         ileMinOdPolnocy < other.ileMinOdPolnocy
  7.         //override def toString = ileMinOdPolnocy+"min"
  8. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement