Last change
on this file since 256 was 1, checked in by Wouter Pasman, 6 years ago |
Initial import : Genius 9.0.0
|
File size:
916 bytes
|
Line | |
---|
1 | package genius.core;
|
---|
2 | /**
|
---|
3 | * This class stores info about a parameter of an agent.
|
---|
4 | * @author W.Pasman 19aug08
|
---|
5 | */
|
---|
6 |
|
---|
7 | public class AgentParam {
|
---|
8 | public String agentclass; // the agent class for which this is a parameter.
|
---|
9 | // we do not refer to Class because that suggests loading its definition etc
|
---|
10 | // and that may not be possible, especially from static contexts.
|
---|
11 | public String name;
|
---|
12 | public Double min;
|
---|
13 | public Double max;
|
---|
14 |
|
---|
15 | public AgentParam(String agentclassP, String nameP, Double minP, Double maxP)
|
---|
16 | {
|
---|
17 | agentclass=agentclassP;
|
---|
18 | name=nameP;
|
---|
19 | min=minP;
|
---|
20 | max=maxP;
|
---|
21 | }
|
---|
22 |
|
---|
23 | static final long serialVersionUID=0;
|
---|
24 |
|
---|
25 | public boolean equals(Object o) {
|
---|
26 | if (!(o instanceof AgentParam)) return false;
|
---|
27 | AgentParam ap=(AgentParam)o;
|
---|
28 | return ap.agentclass.equals(agentclass) && ap.name.equals(name) /*&& ap.min==min && ap.max==max*/;
|
---|
29 | }
|
---|
30 | public String toString() {
|
---|
31 | return agentclass+":"+name;
|
---|
32 | }
|
---|
33 |
|
---|
34 | } |
---|
Note:
See
TracBrowser
for help on using the repository browser.