Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: 9251fd45b205c409e1c1a4c57c617ce6289661e6 (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
/*******************************************************************************
 * Copyright (c) 2011 protos software gmbh (http://www.protos.de).
 * 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
 * 
 * CONTRIBUTORS:
 * 		Henrik Rentz-Reichert (initial contribution)
 * 
 *******************************************************************************/

package org.eclipse.etrice.dctools.fsm.ast

import java.util.HashMap
import org.eclipse.emf.ecore.EObject

class CandidateMap extends HashMap<String, EObject> {
	
	def CandidateMap getMatches(String prefix) {
		val result = new CandidateMap
		
		for (entry : entrySet) {
			if (entry.key.startsWith(prefix)) {
				result.put(entry.key, entry.value)
			}
		}
		
		return result
	}
}

Back to the top