Package com.saperion.ngc.events
Class EventCastUtil
- java.lang.Object
-
- com.saperion.ngc.events.EventCastUtil
-
public final class EventCastUtil extends java.lang.ObjectUtility class to cast a ZK eventEventto needed event class.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T extends org.zkoss.zk.ui.event.Event>
Tcast(org.zkoss.zk.ui.event.Event event, java.lang.Class<T> type)Converts the given event to the needed type.
-
-
-
Method Detail
-
cast
public static <T extends org.zkoss.zk.ui.event.Event> T cast(org.zkoss.zk.ui.event.Event event, java.lang.Class<T> type)Converts the given event to the needed type.If cast of event fails a
IllegalArgumentExceptionis 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
IllegalArgumentExceptionif cast fails
-
-