Mercurial > hg > Members > nobuyasu > jungle-network
diff src/jungle/app/bbs/codesegment/HashLogUpdateCodeSegment.java @ 66:29127ac788a6
move some files
author | one |
---|---|
date | Tue, 20 Aug 2013 17:38:09 +0900 (2013-08-20) |
parents | src/jungle/test/bbs/codesegment/HashLogUpdateCodeSegment.java@16135d5e804f |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/jungle/app/bbs/codesegment/HashLogUpdateCodeSegment.java Tue Aug 20 17:38:09 2013 +0900 @@ -0,0 +1,24 @@ +package jungle.app.bbs.codesegment; + +import alice.codesegment.CodeSegment; +import alice.datasegment.CommandType; +import alice.datasegment.Receiver; +import alice.jungle.datasegment.HashSetDataSegment; + +public class HashLogUpdateCodeSegment extends CodeSegment { + + Receiver hashLog = ids.create(CommandType.PEEK); + Receiver logString = ids.create(CommandType.TAKE); + + public HashLogUpdateCodeSegment() { + hashLog.setKey("hashLog"); + logString.setKey("logString"); + } + + public void run() { + HashSetDataSegment ds = hashLog.asClass(HashSetDataSegment.class); + String str = logString.asString(); + ds.hash.add(str); + ods.put("hashLog", ds); + } +}