audiojury.domain
Class Judgement

java.lang.Object
  |
  +--audiojury.domain.Judgement
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
PairedJudgement, SingleJudgement

public class Judgement
extends java.lang.Object
implements java.io.Serializable

Represents a judgement.

See Also:
Serialized Form

Constructor Summary
Judgement()
          Creates a new Judgement object.
 
Method Summary
 void addSound(Sound sound)
          Adds a Sound to the Judgement.
 Score getScore()
          Retrieves the score this Judgement has got.
 java.util.Vector getSounds()
          A judgement can consist of one or two Sound objects.
 boolean isPractice()
          Checks if the Judgement is a practice or real judgement.
 void setPractice(boolean jpractice)
          Marks the Judgement as a practice or real judgement.
 void setScore(Score score)
          Assigns a score to the Judgement.
 java.lang.String toString()
          Returns a String with the names of the Sounds the Judgement contains.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Judgement

public Judgement()
Creates a new Judgement object.

Method Detail

isPractice

public boolean isPractice()
Checks if the Judgement is a practice or real judgement. Use this method to determine if this judgement is part of the set of practice judgements that are presented before the real test starts.

Returns:
True if this judgement is part of the practice set, false otherwise.

setPractice

public void setPractice(boolean jpractice)
Marks the Judgement as a practice or real judgement. Use this method to make or unmake this judgement part of the practice set.

Parameters:
jpractice - Set to true if this judgement should be part of the practice set, false otherwise.

setScore

public void setScore(Score score)
Assigns a score to the Judgement. This is called after a test subject has made his/her decision about the judgement.

Parameters:
score - The score of this judgement.

getScore

public Score getScore()
Retrieves the score this Judgement has got.

Returns:
The score of the judgement.

getSounds

public java.util.Vector getSounds()
A judgement can consist of one or two Sound objects. This method returns them in vector form.

Returns:
A vector of Sound objects.

addSound

public void addSound(Sound sound)
Adds a Sound to the Judgement. Even though it is possible to add arbitrarily many, it doesn't make sense to add more than one or two.

Parameters:
sound - A Sound object to add.

toString

public java.lang.String toString()
Returns a String with the names of the Sounds the Judgement contains. The format of the string is "'name1' - 'name2' - 'name3'". If no sounds exist the string "empty judgement" is returned.

Overrides:
toString in class java.lang.Object
Returns:
A String with Sound names.