code: public static TraceEvent getType(List<TraceEvent> events, String identifier, int... types)
     {
        for (TraceEvent te : events)
        {
           for (int type : types)
           {
              if (te.getType() == type && (identifier == null || te.getConnectionListener().equals(identifier)))
                 return te;
           }
        }
  
        return null;
     }
docs: Get a specific event type
  @param events The events
  @param identifier The connection listener
  @param types The types
  @return The first event type found; otherwise <code>null</code> if none