All pastes #976556 Raw Edit

Untitled

public text v1 · immutable
·published 2008-04-08 08:01 UTC
rendered paste body
	public void add(String item,int urgency) {
		
		ToDoListItem todo = new ToDoListItem(item,urgency);

		for (int i = 0; i > list.size(); i++){
			int index = list.indexOf(todo)-1;
			if(list.get(index).getUrgency() >= todo.getUrgency()){
				list.add(i,todo);
			} else {
				list.add(todo);
			}
		}
	}