edu.csus.ecs.pc2.api

## Interface IClarification

-     public interface IClarification

  This interface describes the PC2 API view of a contest Clarification. A Clarification is a submitted question by a Team to the Judges.

  This documentation describes the current draft of the PC2 API, which is subject to change.

  Version:
    $Id$
  Author:
    pc2@ecs.csus.edu

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(Object obj)` Check whether this Clarification is the same as some other Clarification.
    `String` | `getAnswer()` Return a string of the judge's answer for the team's question.
    `int` | `getNumber()` Get the clarification number.
    `IProblem` | `getProblem()` Get the problem for which this clarification was submitted.
    `String` | `getQuestion()` Return a string of the team's question for the judges.
    `int` | `getSiteNumber()` Get the site number associated with the clarification.
    `long` | `getSubmissionTime()` Get the number of minutes which had elapsed on the contest clock at the site where the clarification submission was received when the clarification was submitted.
    `ITeam` | `getTeam()` Get the team (client) that submitted this clarification.
    `int` | `hashCode()` Get the hashcode associated with this client.
    `boolean` | `isAnswered()` Return a boolean indicating whether or not the clarification been answered.
    `boolean` | `isDeleted()` Return a boolean indicating whether the clarification been marked as deleted by the Contest Administrator.
    `boolean` | `isSendToAll()` Return a boolean indicating whether or not the clarification is sent to all teams.

- - ### Method Detail

    - #### isAnswered

          boolean isAnswered()

      Return a boolean indicating whether or not the clarification been answered.
      Returns:
        true if the clarification has been answered, false if not answered.

    - #### getQuestion

          String getQuestion()

      Return a string of the team's question for the judges.
      Returns:
        question from team.

    - #### getAnswer

          String getAnswer()

      Return a string of the judge's answer for the team's question.
      Returns:
        answer from judge or null if not answered.

    - #### isDeleted

          boolean isDeleted()

      Return a boolean indicating whether the clarification been marked as deleted by the Contest Administrator.
      Returns:
        true if the clarification is marked deleted, else false.

    - #### getTeam

          ITeam getTeam()

      Get the team (client) that submitted this clarification.
      Returns:
        the `ITeam` which submitted this clarification.

    - #### getProblem

          IProblem getProblem()

      Get the problem for which this clarification was submitted.
      Returns:
        the `IProblem` associated with this clarification.

    - #### getNumber

          int getNumber()

      Get the clarification number. Every submitted clarification is assigned a site-unique Clarification number by the PC2 server which first receives the submission (that is, by the server to which the submitting team client is connected). Clarification numbers are always positive and always increasing at any given site (that is, every new clarification at a given site will acquire a clarification number higher than any previous clarification at that same site). Every submitted clarification is also populated with the unique site number of the site where the clarification is first received. The combination of the site number and the clarification number therefore provides a contest-wide unique identifier for every clarification in the contest.
      Returns:
        the number for this clarification.

    - #### getSiteNumber

          int getSiteNumber()

      Get the site number associated with the clarification. This will always be the unique number of the site where the clarification was received by a PC2 server.
      Returns:
        the site number for this clarification.

    - #### getSubmissionTime

          long getSubmissionTime()

      Get the number of minutes which had elapsed on the contest clock at the site where the clarification submission was received when the clarification was submitted.
      Returns:
        the number of minutes elapsed when this clarification was submitted to a PC2 server.

    - #### equals

          boolean equals(Object obj)

      Check whether this Clarification is the same as some other Clarification.

      Determination of whether two Runs are equal is based on whether they refer to the same clarification as submitted by a Team. Note in particular that subsequent changes to a Clarification made by the Contest Administrator (for example, changes to the time the clarification was received, the problem specified in the clarification, or whether the clarification solved the problem or not) do not affect the result of the `equals()` method; if this Clarification refers to the same Clarification as the one indicated by the specified parameter, this method will return true regardless of whether the internal contents of the two Clarification objects is identical or not.

      Overrides:
        `equals` in class `Object`
      Parameters:
        `obj` - the Clarification which is to be compared with this Clarification for equality.
      Returns:
        True if the specified object refers to the same Clarification as this Clarification (regardless of the actual content of the two Runs).

    - #### hashCode

          int hashCode()

      Get the hashcode associated with this client.
      Overrides:
        `hashCode` in class `Object`
      Returns:
        An integer hashcode for this object.

    - #### isSendToAll

          boolean isSendToAll()

      Return a boolean indicating whether or not the clarification is sent to all teams.
      Returns:
        True if the clarification is being sent to all teams, else false.