package uk.co.patrickhaston.mars;

public class MarsStatement extends MarsData 
{
  public String speaker;  
  // The name of the person who made the statement
  public String theText;
  // The statement itself.
  
  public MarsStatement(int id)
  {
    super(id);
    speaker = "";
    theText = "";
  }

  public MarsStatement(MarsStatement s)
  {
    super((MarsData) s);
    if (s != null)
    {
      speaker = s.speaker;
      theText = s.theText;
    }
    else
    {
      speaker = "";
      theText = "";
    }
  }
  
  public MarsStatement(String line)
  {
    super(line);
    speaker = readString(line, 0);
    theText = readString(line, 1);
  }

  public String toString()
  {
    // This is used to display the entry if the class is attached to a combo-box
    return (speaker + " - " + theText);
  }

}
