public final class ScoreArray extends ScoreFunctionBase implements ScoreFunction, Scriptable
| Modifier and Type | Field and Description |
|---|---|
static int |
MAX_ARRAY_SIZE
The maximum size of the array.
|
| Constructor and Description |
|---|
ScoreArray()
Creates a new index of scores where all scores return 0;
|
ScoreArray(int[] scores)
Creates a new index of scores.
|
| Modifier and Type | Method and Description |
|---|---|
int |
get(int i)
Returns the score for the specified index.
|
protected static ScoreArray |
linearRange(int from,
int to)
Linear Range
|
static ScoreArray |
parse(java.util.Map<java.lang.String,java.lang.String> config) |
protected int[] |
scores() |
java.lang.Appendable |
toScript(java.lang.Appendable script)
Writes the script for the object on to the specified writer.
|
java.lang.String |
toString() |
typeclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waittypepublic static final int MAX_ARRAY_SIZE
public ScoreArray()
public ScoreArray(int[] scores)
public int get(int i)
get in interface ScoreFunctioni - The indexprotected int[] scores()
public java.lang.String toString()
toString in class java.lang.Objectpublic static ScoreArray parse(java.util.Map<java.lang.String,java.lang.String> config)
config - the configurationprotected static ScoreArray linearRange(int from, int to)
public java.lang.Appendable toScript(java.lang.Appendable script)
throws java.io.IOException
ScriptabletoScript in interface Scriptablescript - Where to write the script.Appendablejava.io.IOException - If an I/O error occurs