annotate src/alice/test/topology/aquarium/SetLocation.java @ 216:21bd8af1cf26 working

change asClass method
author one
date Wed, 27 Mar 2013 19:38:33 +0900
parents fec0726bb126
children b5c642ba998e
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
134
53aff28cde6b change package
sugi
parents: 127
diff changeset
1 package alice.test.topology.aquarium;
91
19f3bd33277d add KeyInput
sugi
parents:
diff changeset
2
19f3bd33277d add KeyInput
sugi
parents:
diff changeset
3 import alice.codesegment.CodeSegment;
19f3bd33277d add KeyInput
sugi
parents:
diff changeset
4 import alice.datasegment.CommandType;
19f3bd33277d add KeyInput
sugi
parents:
diff changeset
5 import alice.datasegment.Receiver;
19f3bd33277d add KeyInput
sugi
parents:
diff changeset
6
19f3bd33277d add KeyInput
sugi
parents:
diff changeset
7
111
ba64a9d76e70 Add AutoIncrement
sugi
parents: 110
diff changeset
8 public class SetLocation extends CodeSegment{
91
19f3bd33277d add KeyInput
sugi
parents:
diff changeset
9
97
df786bf8f036 add FishPoint.java and Test
sugi
parents: 94
diff changeset
10 private Receiver position = ids.create(CommandType.PEEK);
138
87f1a30a8c82 change range automatic
sugi
parents: 134
diff changeset
11 private MakeObject obj;
178
1b532146b355 minor change
e095732
parents: 170
diff changeset
12 private int range; // should be DS
91
19f3bd33277d add KeyInput
sugi
parents:
diff changeset
13
178
1b532146b355 minor change
e095732
parents: 170
diff changeset
14 public SetLocation(MakeObject obj ,String key, int index, int range){
127
117dad267a9b add apiTest put
sugi
parents: 115
diff changeset
15 this.obj = obj;
110
aa9fc077c286 remove host from checkFishLocation
sugi
parents: 107
diff changeset
16 this.range = range;
105
993a9f194615 success share TEST
sugi
parents: 97
diff changeset
17 this.position.setKey("local",key,index);
91
19f3bd33277d add KeyInput
sugi
parents:
diff changeset
18 }
19f3bd33277d add KeyInput
sugi
parents:
diff changeset
19
19f3bd33277d add KeyInput
sugi
parents:
diff changeset
20 @Override
19f3bd33277d add KeyInput
sugi
parents:
diff changeset
21 public void run(){
216
21bd8af1cf26 change asClass method
one
parents: 214
diff changeset
22 FishPoint fp = this.position.asClass(FishPoint.class);
170
6a69891b7232 change view point
sugi
parents: 143
diff changeset
23 obj.setLocation(fp.getX(), fp.getY(), fp.getZ());
214
fec0726bb126 remove error
one
parents: 212
diff changeset
24 new SetLocation(obj, position.key, position.index, range);
110
aa9fc077c286 remove host from checkFishLocation
sugi
parents: 107
diff changeset
25
91
19f3bd33277d add KeyInput
sugi
parents:
diff changeset
26 }
19f3bd33277d add KeyInput
sugi
parents:
diff changeset
27
19f3bd33277d add KeyInput
sugi
parents:
diff changeset
28
19f3bd33277d add KeyInput
sugi
parents:
diff changeset
29 }