view src/test/java/alice/jungle/HashSetConvertTest.java @ 82:60d28fedcbf2

Remove unnecessary files and move some files
author one
date Wed, 16 Oct 2013 20:53:44 +0900
parents src/jungle/test/alice/HashSetConvertTest.java@4851344e120e
children f9e29a52efd3
line wrap: on
line source

package test.java.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() {}
	}
}