1 /*******************************************************************************
2 * Copyright (c) 2014 Ericsson
4 * All rights reserved. This program and the accompanying materials are
5 * made available under the terms of the Eclipse Public License v1.0 which
6 * accompanies this distribution, and is available at
7 * http://www.eclipse.org/legal/epl-v10.html
10 * Matthew Khouzam - Initial API and implementation
11 *******************************************************************************/
13 package org
.eclipse
.linuxtools
.tmf
.core
.trace
;
15 import java
.util
.HashSet
;
18 import org
.eclipse
.linuxtools
.tmf
.core
.event
.ITmfEventType
;
21 * Set Helper for sets of ITmfTraceType
23 * TODO Remove once Java 8 is used (replace with Streams)
25 * @author Matthew Khouzam
28 public final class TmfEventTypeCollectionHelper
{
30 private TmfEventTypeCollectionHelper() {
34 * Gets the event names from a collection of event types
37 * an iterable collection of ITmfEventTypes
38 * @return a set of the names of these events, if some names are clashing
39 * they will only appear once
41 public static Set
<String
> getEventNames(Iterable
<ITmfEventType
> eventTypes
) {
42 Set
<String
> retSet
= new HashSet
<>();
43 for (ITmfEventType eventType
: eventTypes
) {
44 retSet
.add(eventType
.getName());