public int compare(Task task1, Task task2) {
			if (task1.getDeadline() == null && task2.getDeadline() == null) {
				return 0;
			} else if (task1.getDeadline() != null
					&& task2.getDeadline() == null) {
				return 1;
			} else if (task1.getDeadline() == null
					&& task2.getDeadline() != null) {
				return -1;
			} else if (task1.getDeadline() != null && task2.getDeadline() != null) {
				return task1.getDeadline().compareTo(task2.getDeadline());
			}
			
			return 0;
		}