Skip to content

Package: BazaarContextImpl

BazaarContextImpl

nameinstructionbranchcomplexitylinemethod
BazaarContextImpl(Map)
M: 0 C: 10
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 3
100%
M: 0 C: 1
100%
getContextMap()
M: 0 C: 3
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%

Coverage

1: /*******************************************************************************
2: * Copyright (c) 2018 Christian W. Damus and others.
3: *
4: * All rights reserved. This program and the accompanying materials
5: * are made available under the terms of the Eclipse Public License 2.0
6: * which accompanies this distribution, and is available at
7: * https://www.eclipse.org/legal/epl-2.0/
8: *
9: * SPDX-License-Identifier: EPL-2.0
10: *
11: * Contributors:
12: * Christian W. Damus - initial API and implementation
13: ******************************************************************************/
14: package org.eclipse.emfforms.bazaar.internal;
15:
16: import static java.util.Collections.unmodifiableMap;
17:
18: import java.util.HashMap;
19: import java.util.Map;
20:
21: import org.eclipse.emfforms.bazaar.BazaarContext;
22:
23: /**
24: * Default implementation of the bazaar context.
25: *
26: * @author Christian W. Damus
27: */
28: public class BazaarContextImpl implements BazaarContext {
29:         private final Map<String, Object> contextMap;
30:
31:         /**
32:          * Initializes me with my contents.
33:          *
34:          * @param contextMap my contents.
35:          */
36:         public BazaarContextImpl(Map<String, Object> contextMap) {
37:                 super();
38:
39:                 this.contextMap = unmodifiableMap(new HashMap<String, Object>(contextMap));
40:         }
41:
42:         @Override
43:         public Map<String, Object> getContextMap() {
44:                 return contextMap;
45:         }
46:
47: }