Skip to main content
summaryrefslogtreecommitdiffstats
blob: bdb99c7d537dd46f99e5bd4529634c23ff688225 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
/*******************************************************************************
 * Copyright (c) 2005-2009 itemis AG (http://www.itemis.eu) and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 *******************************************************************************/
package org.eclipse.xtend.util.stdlib.tracing;

import java.util.ArrayList;
import java.util.Collection;
import java.util.List;

import org.eclipse.emf.ecore.EObject;

public class M2MTraceElement extends TraceElement {

	private List<EObject> targets = new ArrayList<EObject>();
	
	public M2MTraceElement( String kind, EObject from, EObject to ) {
		super(from, kind);
		targets.add( to );
	}
	
	public M2MTraceElement( String kind, EObject from, Collection<EObject> to ) {
		super(from, kind);
		targets.addAll( to );
	}
	
	public M2MTraceElement( String kind, Collection<EObject> from, EObject to ) {
		super(from, kind);
		targets.add( to );
	}

	public List<EObject> getTargets() {
		return targets;
	}
	
	public boolean isSingleTarget() {
		return targets.size() == 1;
	}
	
	
}

Back to the top