/**
 * A to-do list item is simply a container for a String item
 * and its int urgency rating.
 *
 * @author Zach Tomaszewski
 * @version 28 Oct 2008
 */
public class ToDoListItem {

  private String item;
  private int urgency;

  public ToDoListItem(String item, int urgency) {
    this.item = item;
    this.urgency = urgency;
  }

  public String getItem() {
    return this.item;
  }

  public int getUrgency() {
    return this.urgency;
  }

  public void setUrgency(int changedUrgency) {
    this.urgency = changedUrgency;
  }

  /**
   * Returns a String representation of this item, which looks like this:
   * <pre>
   * [##] item text here
   * </pre>
   * where ## corresponds to the item's urgency rating.
   */
  public String toString() {
    return "[" + this.urgency + "] " + this.item;
  }

}