All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.sf.javagimmicks.collections.event.cdi.CDISetEvent Maven / Gradle / Ivy

There is a newer version: 0.99-alpha1
Show newest version
package net.sf.javagimmicks.collections.event.cdi;

import net.sf.javagimmicks.collections.event.SetEvent;
import net.sf.javagimmicks.event.Observable;

/**
 * A CDI compatible wrapper around a {@link SetEvent}.
 * 

* CDI event objects may not have type parameters, so the type information needs * to be erased for the wrapped {@link SetEvent}. */ public class CDISetEvent implements SetEvent { private final SetEvent _origin; @SuppressWarnings("unchecked") CDISetEvent(final SetEvent origin) { _origin = (SetEvent) origin; } /** * Provides access to the wrapped {@link SetEvent} * * @return the wrapped {@link SetEvent} */ public SetEvent getWrappedEvent() { return _origin; } @Override public Type getType() { return _origin.getType(); } @Override public Object getElement() { return _origin.getElement(); } @Override public Observable> getSource() { return _origin.getSource(); } }