public boolean isBefore(SimpleTime time) { int thisTime = mHour * 60 + mMinute; int givenTime = time.getHour() * 60 + time.getMinute(); if (thisTime < givenTime) { return true; } return false; }
public boolean equals(Object time) { if (time instanceof SimpleTime) { SimpleTime t = (SimpleTime) time; if (t.getHour() == mHour && t.getMinute() == mMinute) { return true; } } return false; }
public int differenceInMinutes(SimpleTime time) { return Math.abs((time.getHour() * 60 + time.getMinute()) - (mHour * 60 + mMinute)); }
public void copy(SimpleTime time) { mHour = time.getHour(); mMinute = time.getMinute(); }
public SimpleTime(SimpleTime time) { this(time.getHour(), time.getMinute()); }