Code example for Calendar

Methods: after, clear, clone, set

0
      return new GregorianCalendar(1970,01,01);
    } 
  } 
   
  public static Maybe<SavedAlert> findNextAlert(Cursor cursor) {
    return findNextAlert(cursor, Long.MAX_VALUE, new Nothing<SavedAlert>());
  } 
 
  private static Maybe<SavedAlert> findNextAlert(Cursor cursor, Long minTime, Maybe<SavedAlert> nextAlert) {
    if (cursor.moveToNext()) {
      SavedAlert alert = new SavedAlert(cursor.getLong(0),
          new Alert(stringToCalendar(cursor.getString(1)),
              cursor.getInt(2) == 1,
              cursor.getInt(3) == 1,
              cursor.getInt(4) == 1,
              cursor.getInt(5) == 1,
              cursor.getInt(6) == 1,
              cursor.getInt(7) == 1,
              cursor.getInt(8) == 1,
              cursor.getString(9),
              cursor.getInt(10) == 1,
              cursor.getInt(11) == 1));
      Long alertTime = alert.alertAt().getTimeInMillis();
      if (alertTime < minTime)
        return findNextAlert(cursor, alertTime, new Just<SavedAlert>(alert));
      else 
        return findNextAlert(cursor, minTime, nextAlert);
    } else {