Last change
on this file was 127, checked in by Wouter Pasman, 6 years ago |
#41 ROLL BACK of rev.126 . So this version is equal to rev. 125
|
File size:
673 bytes
|
Line | |
---|
1 | package genius.core.actions;
|
---|
2 |
|
---|
3 | import genius.core.AgentID;
|
---|
4 |
|
---|
5 | /**
|
---|
6 | * inform about some property. Immutable.
|
---|
7 | *
|
---|
8 | * @author dfesten on 21-8-2014.
|
---|
9 | * @author W.Pasman: made immutable
|
---|
10 | */
|
---|
11 | public class Inform extends DefaultAction {
|
---|
12 | private Object value;
|
---|
13 | private String name;
|
---|
14 |
|
---|
15 | public Inform(AgentID id, String name, Object value) {
|
---|
16 | super(id);
|
---|
17 | this.name = name;
|
---|
18 | this.value = value;
|
---|
19 | }
|
---|
20 |
|
---|
21 | public Object getValue() {
|
---|
22 | return value;
|
---|
23 | }
|
---|
24 |
|
---|
25 | public String getName() {
|
---|
26 | return name;
|
---|
27 | }
|
---|
28 |
|
---|
29 | /**
|
---|
30 | * Enforces that actions implements a string-representation.
|
---|
31 | */
|
---|
32 | @Override
|
---|
33 | public String toString() {
|
---|
34 | return name + ":" + value.toString();
|
---|
35 | }
|
---|
36 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.