source: src/main/java/genius/core/tournament/VariablesAndValues/AgentValue.java

Last change on this file was 1, checked in by Wouter Pasman, 6 years ago

Initial import : Genius 9.0.0

File size: 1.0 KB
Line 
1package genius.core.tournament.VariablesAndValues;
2
3import genius.core.repository.AgentRepItem;
4
5public class AgentValue extends TournamentValue
6{
7 private static final long serialVersionUID = -1479458519909188852L;
8 AgentRepItem value;
9
10 public AgentValue(AgentRepItem val) { value=val; }
11 public String toString() { return value.getName(); }
12 public AgentRepItem getValue() { return value; }
13 /* (non-Javadoc)
14 * @see java.lang.Object#hashCode()
15 */
16 @Override
17 public int hashCode() {
18 final int prime = 31;
19 int result = 1;
20 result = prime * result + ((value == null) ? 0 : value.hashCode());
21 return result;
22 }
23 /* (non-Javadoc)
24 * @see java.lang.Object#equals(java.lang.Object)
25 */
26 @Override
27 public boolean equals(Object obj) {
28 if (this == obj)
29 return true;
30 if (obj == null)
31 return false;
32 if (getClass() != obj.getClass())
33 return false;
34 AgentValue other = (AgentValue) obj;
35 if (value == null) {
36 if (other.value != null)
37 return false;
38 } else if (!value.equals(other.value))
39 return false;
40 return true;
41 }
42}
Note: See TracBrowser for help on using the repository browser.