Skip to content

Package: SegmentConverterValueResultImpl

SegmentConverterValueResultImpl

nameinstructionbranchcomplexitylinemethod
SegmentConverterValueResultImpl(IEMFValueProperty, EClass)
M: 0 C: 9
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 4
100%
M: 0 C: 1
100%
getNextEClass()
M: 0 C: 4
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
getValueProperty()
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: * lucas - initial API and implementation
13: ******************************************************************************/
14: package org.eclipse.emfforms.internal.core.services.databinding;
15:
16: import java.util.Optional;
17:
18: import org.eclipse.emf.databinding.IEMFValueProperty;
19: import org.eclipse.emf.ecore.EClass;
20: import org.eclipse.emfforms.spi.core.services.databinding.emf.SegmentConverterValueResultEMF;
21:
22: /**
23: * Default implementation of {@link SegmentConverterValueResultEMF}.
24: *
25: * @author Lucas Koehler
26: *
27: */
28: public class SegmentConverterValueResultImpl implements SegmentConverterValueResultEMF {
29:         private final IEMFValueProperty valueProperty;
30:         private final EClass nextEClass;
31:
32:         /**
33:          * Creates a new {@link SegmentConverterValueResultImpl}.
34:          *
35:          * @param valueProperty The {@link IEMFValueProperty}
36:          * @param nextEClass The next {@link EClass}, may be <code>null</code>
37:          */
38:         public SegmentConverterValueResultImpl(IEMFValueProperty valueProperty, EClass nextEClass) {
39:                 this.valueProperty = valueProperty;
40:                 this.nextEClass = nextEClass;
41:
42:         }
43:
44:         @Override
45:         public IEMFValueProperty getValueProperty() {
46:                 return valueProperty;
47:         }
48:
49:         @Override
50:         public Optional<EClass> getNextEClass() {
51:                 return Optional.ofNullable(nextEClass);
52:         }
53:
54: }