/*
 * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
 * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
 * 
 * $Id: LinkedListHashSetTextDecoder.java 73928 2014-08-01 09:35:37Z supol $
 */

package com.sun.ts.tests.websocket.ee.javax.websocket.session11.common;

import java.util.HashSet;
import java.util.LinkedList;

import javax.websocket.DecodeException;
import javax.websocket.Decoder;
import javax.websocket.EndpointConfig;

public class LinkedListHashSetTextDecoder implements Decoder.Text<LinkedList<HashSet<String>>> {

	@Override
	public void destroy() {
	}

	@Override
	public void init(EndpointConfig arg0) {
	}

	@Override
	public LinkedList<HashSet<String>> decode(String arg0) throws DecodeException {
		HashSet<String> set = new HashSet<String>();
		set.add(arg0);
		LinkedList<HashSet<String>> list = new LinkedList<HashSet<String>>();
		list.add(set);
		return list;
	}

	@Override
	public boolean willDecode(String arg0) {
		return true;
	}

}
