com.drismo.model
Class Quality
java.lang.Object
com.drismo.model.Quality
public class Quality
- extends java.lang.Object
A static class to model quality. Use this class to get a color to represent
the current quality based of a given score, and find out if a score is good/bad/ugly.
This class holds all the Quality constants.
Constructor Summary |
private |
Quality()
This class is not instantiated! |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MAX_SCORE
public static final int MAX_SCORE
- See Also:
- Constant Field Values
EXCELLENT_SCORE
public static final int EXCELLENT_SCORE
- See Also:
- Constant Field Values
GOOD_SCORE
public static final int GOOD_SCORE
- See Also:
- Constant Field Values
OK_SCORE
public static final int OK_SCORE
- See Also:
- Constant Field Values
MIN_SCORE
public static final int MIN_SCORE
- See Also:
- Constant Field Values
EXCELLENT_COLOR
public static final int EXCELLENT_COLOR
GOOD_COLOR
public static final int GOOD_COLOR
BAD_COLOR
public static final int BAD_COLOR
- See Also:
- Constant Field Values
UGLY_COLOR
public static final int UGLY_COLOR
- See Also:
- Constant Field Values
Quality
private Quality()
- This class is not instantiated!
getColorFromScore
public static int getColorFromScore(int score)
getDynamicColorFromScore
public static int getDynamicColorFromScore(int score)
- Used to get a color from the score. The color changes fades from red -> yellow -> green -> blue
- Parameters:
score
- The score to get the color from
- Returns:
- Returns the color
- See Also:
PrimitiveMonitor
getQualityStringId
public static int getQualityStringId(int score)