Last change
on this file was 1, checked in by Wouter Pasman, 7 years ago |
Initial import : Genius 9.0.0
|
File size:
1.1 KB
|
Line | |
---|
1 | package genius.core.tournament.VariablesAndValues;
|
---|
2 |
|
---|
3 | import java.io.Serializable;
|
---|
4 | import java.util.ArrayList;
|
---|
5 |
|
---|
6 | /**
|
---|
7 | * TournamentVariable is an abstract class, it is either a ProfileVariable,
|
---|
8 | * AgentVariable or AgentParameterVariable, and it has a set of values that it
|
---|
9 | * can take. During the tournament, all of the values will be used one after
|
---|
10 | * another, in the order given in the ArrayList.
|
---|
11 | *
|
---|
12 | * @author wouter
|
---|
13 | *
|
---|
14 | */
|
---|
15 | public abstract class TournamentVariable implements Serializable {
|
---|
16 | private static final long serialVersionUID = 5326059723219308268L;
|
---|
17 | ArrayList<TournamentValue> values = new ArrayList<TournamentValue>();
|
---|
18 |
|
---|
19 | /** ordered list of values this var can take */
|
---|
20 |
|
---|
21 | /** add given value to the array of values */
|
---|
22 | public abstract void addValue(TournamentValue value) throws Exception;
|
---|
23 |
|
---|
24 | public ArrayList<TournamentValue> getValues() {
|
---|
25 | return values;
|
---|
26 | }
|
---|
27 |
|
---|
28 | public void setValues(ArrayList<TournamentValue> newvals) {
|
---|
29 | values = newvals;
|
---|
30 | }
|
---|
31 |
|
---|
32 | /**
|
---|
33 | * varToString converts the variable name into a string. It shound NOT
|
---|
34 | * convert the values, only the variable name and its parameters (eg
|
---|
35 | * AgentParam[tau])
|
---|
36 | */
|
---|
37 | public abstract String varToString();
|
---|
38 |
|
---|
39 | } |
---|
Note:
See
TracBrowser
for help on using the repository browser.