Advertisement
Guest User

Untitled

a guest
Sep 29th, 2016
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.37 KB | None | 0 0
  1. public boolean isBefore(Clock time) {
  2.         boolean result = false;
  3.        
  4.         if (this.hour < time.hour)
  5.             result = true;
  6.         else if (this.hour == time.hour) {
  7.             if (this.minute < time.minute)
  8.                 result = true;
  9.             else if (this.minute == time.minute) {
  10.                 if (this.second < time.second)
  11.                     result = true;
  12.             }
  13.         }
  14.         else {
  15.             return false;
  16.         }
  17.        
  18.         return result;
  19.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement