Skip to content

Package: TableConfigurationImpl

TableConfigurationImpl

nameinstructionbranchcomplexitylinemethod
TableConfigurationImpl(Set, Map)
M: 5 C: 12
71%
M: 1 C: 1
50%
M: 1 C: 1
50%
M: 1 C: 5
83%
M: 0 C: 1
100%
dispose()
M: 0 C: 1
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
getData()
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%
getEnabledFeatures()
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) 2011-2017 EclipseSource Muenchen GmbH 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: * Mat Hansen - initial API and implementation
13: ******************************************************************************/
14: package org.eclipse.emfforms.spi.swt.table;
15:
16: import java.util.Collections;
17: import java.util.Map;
18: import java.util.Set;
19:
20: import org.eclipse.emfforms.common.Feature;
21:
22: /**
23: * @author Mat Hansen <mhansen@eclipsesource.com>
24: *
25: */
26: public final class TableConfigurationImpl implements TableConfiguration {
27:
28:         private final Set<Feature> enabledFeatures;
29:
30:         private final Map<String, Object> data;
31:
32:         /**
33:          * Constructs a new {@link TableConfiguration}.
34:          *
35:          * @param enabledFeatures list of enabled features
36:          * @param data data map
37:          */
38:         public TableConfigurationImpl(
39:                 Set<Feature> enabledFeatures,
40:                 Map<String, Object> data) {
41:                 super();
42:                 this.enabledFeatures = Collections.unmodifiableSet(enabledFeatures);
43:•                if (data == null) {
44:                         throw new IllegalArgumentException("Data map cannot be null"); //$NON-NLS-1$
45:                 }
46:                 this.data = data;
47:         }
48:
49:         @Override
50:         public Set<Feature> getEnabledFeatures() {
51:                 return enabledFeatures;
52:         }
53:
54:         @Override
55:         public Map<String, Object> getData() {
56:                 return data;
57:         }
58:
59:         @Override
60:         public void dispose() {
61:                 // stub, does nothing at the moment
62:         }
63:
64: }