Package com.saperion.ngc.events
Class EventCastUtil
java.lang.Object
com.saperion.ngc.events.EventCastUtil
Utility class to cast a ZK event
Event
to needed event class.-
Method Summary
-
Method Details
-
cast
public static <T extends org.zkoss.zk.ui.event.Event> T cast(org.zkoss.zk.ui.event.Event event, Class<T> type) Converts the given event to the needed type.If cast of event fails a
IllegalArgumentException
is thrown.- Type Parameters:
T
- the generic type for the conversion- Parameters:
event
- the event to converttype
- the generic type to cast for the given event- Returns:
- the casted event or throws
IllegalArgumentException
if cast fails
-