@Test(expected = InvalidKeyException.class) public void getParameterNotInParameters() { event.getParameter("notPresent"); }
public Object getParameter(String parameter) { if (!parameters.containsKey(parameter)) { throw new InvalidKeyException(String.format( "No parameter with name \"%s\" present in the GenericEvent.", parameter )); } return parameters.get(parameter); }
UntypedEvent implements Event, Serializable { public Object getParameter(String parameter) { if (!parameters.containsKey(parameter)) { throw new InvalidKeyException(String.format( "No parameter with name \"%s\" present in the GenericEvent.", parameter )); } return parameters.get(parameter); } }
UntypedEvent implements Event, Serializable { public Object getParameter(String parameter) { if (!parameters.containsKey(parameter)) { throw new InvalidKeyException(String.format( "No parameter with name \"%s\" present in the GenericEvent.", parameter )); } return parameters.get(parameter); } UntypedEvent();  UntypedEvent(GenericEvent other); }
UntypedEvent implements Event, Serializable { public Object getParameter(String parameter) { if (!parameters.containsKey(parameter)) { throw new InvalidKeyException(String.format( "No parameter with name \"%s\" present in the GenericEvent.", parameter )); } return parameters.get(parameter); } UntypedEvent();  UntypedEvent(GenericEvent other); static UntypedEvent fromEvent(GenericEvent event); Object getParameter(String parameter); GenericEvent asEvent(); }
UntypedEvent implements Event, Serializable { public Object getParameter(String parameter) { if (!parameters.containsKey(parameter)) { throw new InvalidKeyException(String.format( "No parameter with name \"%s\" present in the GenericEvent.", parameter )); } return parameters.get(parameter); } UntypedEvent();  UntypedEvent(GenericEvent other); static UntypedEvent fromEvent(GenericEvent event); Object getParameter(String parameter); GenericEvent asEvent();  }