view src/test/java/alice/jungle/HashSetConvertTest.java @ 153:69b5565c4a63

no use toporogy
author tatsuki
date Sat, 05 Jul 2014 18:28:40 +0900
parents f9e29a52efd3
children
line wrap: on
line source

package alice.jungle;

import java.util.HashSet;

import org.msgpack.annotation.Message;

import alice.codesegment.CodeSegment;
import alice.datasegment.CommandType;
import alice.datasegment.Receiver;

public class HashSetConvertTest extends CodeSegment {
	
	Receiver hash = ids.create(CommandType.TAKE);

	public HashSetConvertTest() {
		hash.setKey("hash");
	}
	
	public static void main(String[] args) {
		HashSetDataSegment h = new HashSetDataSegment();
		h.hash.add("test1");
		h.hash.add("test2");
		
		HashSetConvertTest cs = new HashSetConvertTest();
		cs.ods.put("hash", h);
	}
	
	public void run() {
		HashSetDataSegment h = hash.asClass(HashSetDataSegment.class);
		for(String s : h.hash ) {
			System.out.println("s : "+s);
		}
		System.exit(0);
	}
	
	@Message
	private static class HashSetDataSegment {
		public HashSet<String> hash = new HashSet<String>();		
		public HashSetDataSegment() {}
	}
}