public abstract class AbstractScore<S extends Score> extends Object implements Score<S>, Serializable
Score
.
Subclasses must be immutable.
Score
,
HardSoftScore
,
Serialized FormConstructor and Description |
---|
AbstractScore() |
Modifier and Type | Method and Description |
---|---|
protected static String |
buildScorePattern(int levelsSize) |
protected static String |
buildScorePattern(String... levelSuffixes) |
boolean |
isCompatibleArithmeticArgument(Score otherScore) |
protected static BigDecimal |
parseLevelAsBigDecimal(Class<? extends Score> scoreClass,
String scoreString,
String levelString) |
protected static double |
parseLevelAsDouble(Class<? extends Score> scoreClass,
String scoreString,
String levelString) |
protected static int |
parseLevelAsInt(Class<? extends Score> scoreClass,
String scoreString,
String levelString) |
protected static long |
parseLevelAsLong(Class<? extends Score> scoreClass,
String scoreString,
String levelString) |
protected static String[] |
parseLevelStrings(Class<? extends Score> scoreClass,
String scoreString,
int levelsSize) |
protected static String[] |
parseLevelStrings(Class<? extends Score> scoreClass,
String scoreString,
String... levelSuffixes) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
add, divide, multiply, negate, power, subtract, toLevelNumbers
compareTo
protected static String[] parseLevelStrings(Class<? extends Score> scoreClass, String scoreString, int levelsSize)
protected static String[] parseLevelStrings(Class<? extends Score> scoreClass, String scoreString, String... levelSuffixes)
protected static int parseLevelAsInt(Class<? extends Score> scoreClass, String scoreString, String levelString)
protected static long parseLevelAsLong(Class<? extends Score> scoreClass, String scoreString, String levelString)
protected static double parseLevelAsDouble(Class<? extends Score> scoreClass, String scoreString, String levelString)
protected static BigDecimal parseLevelAsBigDecimal(Class<? extends Score> scoreClass, String scoreString, String levelString)
protected static String buildScorePattern(int levelsSize)
public boolean isCompatibleArithmeticArgument(Score otherScore)
isCompatibleArithmeticArgument
in interface Score<S extends Score>
otherScore
- never nullScore.add(Score)
, Score.subtract(Score)
and Comparable.compareTo(Object)
.Copyright © 2006–2016 JBoss by Red Hat. All rights reserved.