66
|
1 package jungle.app.bbs.codesegment;
|
52
|
2
|
|
3 import alice.codesegment.CodeSegment;
|
|
4 import alice.datasegment.CommandType;
|
|
5 import alice.datasegment.Receiver;
|
|
6 import alice.jungle.datasegment.HashSetDataSegment;
|
|
7
|
|
8 public class HashLogUpdateCodeSegment extends CodeSegment {
|
|
9
|
|
10 Receiver hashLog = ids.create(CommandType.PEEK);
|
56
|
11 Receiver logString = ids.create(CommandType.TAKE);
|
52
|
12
|
56
|
13 public HashLogUpdateCodeSegment() {
|
52
|
14 hashLog.setKey("hashLog");
|
56
|
15 logString.setKey("logString");
|
52
|
16 }
|
|
17
|
|
18 public void run() {
|
|
19 HashSetDataSegment ds = hashLog.asClass(HashSetDataSegment.class);
|
56
|
20 String str = logString.asString();
|
52
|
21 ds.hash.add(str);
|
|
22 ods.put("hashLog", ds);
|
|
23 }
|
|
24 }
|