Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| OptaPlanner distribution 6.2.0.Final
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.optaplanner.core.api.score
Class AbstractScore<S extends Score>

    java.lang.Object
      org.optaplanner.core.api.score.AbstractScore<S>

All Implemented Interfaces:
  Serializable, Comparable<S>, Score<S>

Direct Known Subclasses:
  BendableBigDecimalScore, BendableLongScore, BendableScore, HardMediumSoftLongScore, HardMediumSoftScore, HardSoftBigDecimalScore, HardSoftDoubleScore, HardSoftLongScore, HardSoftScore, SimpleBigDecimalScore, SimpleDoubleScore, SimpleLongScore, SimpleScore

    public abstract class AbstractScore<S extends Score>

extends Object
implements Score<S>, Serializable

Abstract superclass for `Score`.

Subclasses must be immutable.

See Also:
  `Score`, `HardSoftScore`, Serialized Form

Constructor Summary
`AbstractScore()`

Method Summary
`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)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface org.optaplanner.core.api.score.Score
`add, divide, multiply, negate, power, subtract, toLevelNumbers`

Methods inherited from interface java.lang.Comparable
`compareTo`

Constructor Detail

### AbstractScore

    public AbstractScore()

Method Detail

### parseLevelStrings

    protected static String[] parseLevelStrings(Class<? extends Score> scoreClass,
                                                String scoreString,
                                                int levelsSize)

### parseLevelStrings

    protected static String[] parseLevelStrings(Class<? extends Score> scoreClass,
                                                String scoreString,
                                                String... levelSuffixes)

### parseLevelAsInt

    protected static int parseLevelAsInt(Class<? extends Score> scoreClass,
                                         String scoreString,
                                         String levelString)

### parseLevelAsLong

    protected static long parseLevelAsLong(Class<? extends Score> scoreClass,
                                           String scoreString,
                                           String levelString)

### parseLevelAsDouble

    protected static double parseLevelAsDouble(Class<? extends Score> scoreClass,
                                               String scoreString,
                                               String levelString)

### parseLevelAsBigDecimal

    protected static BigDecimal parseLevelAsBigDecimal(Class<? extends Score> scoreClass,
                                                       String scoreString,
                                                       String levelString)

### buildScorePattern

    protected static String buildScorePattern(int levelsSize)

### buildScorePattern

    protected static String buildScorePattern(String... levelSuffixes)

### isCompatibleArithmeticArgument

    public boolean isCompatibleArithmeticArgument(Score otherScore)

  Specified by:
    `isCompatibleArithmeticArgument` in interface `Score<S extends Score>`
  Parameters:
    `otherScore` - never null
  Returns:
    true if the otherScore is accepted as a parameter of `Score.add(Score)`, `Score.subtract(Score)` and `Comparable.compareTo(Object)`.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| OptaPlanner distribution 6.2.0.Final
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2006-2015 JBoss by Red Hat. All Rights Reserved.