audiojury.domain
Class Scale

java.lang.Object
  |
  +--audiojury.domain.Scale
All Implemented Interfaces:
java.io.Serializable

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

Represents a scale used for grading Sounds in Judgements.

See Also:
Serialized Form

Constructor Summary
Scale()
          Creates a new Scale object.
 
Method Summary
 void addScore(Score score)
          Adds a Score to the scale.
 boolean equals(Scale scale)
          Compares a Scale to this scale.
 java.lang.String getHeader()
          Gets the header of the scale.
 java.lang.String getName()
          Gets the name of the scale.
 java.util.Vector getScores()
          Retrives a list of all the Scores in the scale.
 TestMethod[] getTestMethod()
          Gets the TestMethods that is used.
 boolean hasTestMethod(TestMethod method)
          Checks whether a particular TestMethod was assigned to the Scale.
 boolean hasZero()
          Checks if the zero is included in the values of the scale.
 void setHeader(java.lang.String sheader)
          Sets the header of the scale.
 void setName(java.lang.String scalename)
          Sets the name of the scale.
 void setTestMethods(TestMethod[] methods)
          Sets the TestMethods that will be used.
 java.lang.String toString()
          Converts the Scale to an String object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Scale

public Scale()
Creates a new Scale object.

Method Detail

setTestMethods

public void setTestMethods(TestMethod[] methods)
Sets the TestMethods that will be used.

Parameters:
methods - an array containing the TestMethods that will be used.

getTestMethod

public TestMethod[] getTestMethod()
Gets the TestMethods that is used.

Returns:
an array containing the TestMethods that is used.

hasTestMethod

public boolean hasTestMethod(TestMethod method)
Checks whether a particular TestMethod was assigned to the Scale.

Parameters:
method - the TestMethod to check for.
Returns:
boolean indicating if the TestMethod in the set of used test methods in the scale.

equals

public boolean equals(Scale scale)
Compares a Scale to this scale.

Parameters:
scale - the Scale to compare with.
Returns:
boolean indicating if the indeed where equal.

toString

public java.lang.String toString()
Converts the Scale to an String object. Gives the name of the scale.

Overrides:
toString in class java.lang.Object
Returns:
String representing the scale.

getName

public java.lang.String getName()
Gets the name of the scale.

Returns:
String with the name of the scale.

setName

public void setName(java.lang.String scalename)
Sets the name of the scale.

Parameters:
scalename - String with the new name for the scale.

getHeader

public java.lang.String getHeader()
Gets the header of the scale.

Returns:
String with the header used by the scale.

setHeader

public void setHeader(java.lang.String sheader)
Sets the header of the scale.

Parameters:
sheader - String with the new header for the scale.

hasZero

public boolean hasZero()
Checks if the zero is included in the values of the scale.

Returns:
boolean indicating if the number zero is included in the scale.

getScores

public java.util.Vector getScores()
Retrives a list of all the Scores in the scale.

Returns:
Vector containing all Score objects in the scale.

addScore

public void addScore(Score score)
Adds a Score to the scale.

Parameters:
score - the Score to add to the scale.