org.jboss.resteasy.cdi.injection.BookBag Maven / Gradle / Ivy
package org.jboss.resteasy.cdi.injection;
import java.util.Collection;
import java.util.HashSet;
import javax.ejb.Stateful;
import javax.enterprise.context.SessionScoped;
/**
*
* @author Ron Sigal
* @version $Revision: 1.1 $
*
* Copyright May 26, 2012
*/
@Stateful
@SessionScoped
public class BookBag implements BookBagLocal
{
private HashSet books = new HashSet();
public void addBook(Book book)
{
books.add(book);
}
public Collection getContents()
{
return new HashSet(books);
}
}