blob: ca2d755949a293c3fb1d021380921ab4bd34e733 [file] [log] [blame]
/**
* Copyright (c) 2013 CEA LIST.
*
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
*/
package org.eclipse.papyrus.infra.nattable.model.cdo.nattable.nattablestyle.impl;
import java.util.Collection;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.papyrus.infra.nattable.model.nattable.nattablestyle.NattablestylePackage;
import org.eclipse.papyrus.infra.nattable.model.nattable.nattablestyle.StringListValueStyle;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>String List Value Style</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* </p>
* <ul>
* <li>{@link org.eclipse.papyrus.infra.nattable.model.cdo.nattable.nattablestyle.impl.StringListValueStyleImpl#getStringListValue <em>String List Value</em>}</li>
* </ul>
*
* @generated
*/
public class StringListValueStyleImpl extends NamedStyleImpl implements StringListValueStyle {
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected StringListValueStyleImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return NattablestylePackage.Literals.STRING_LIST_VALUE_STYLE;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@SuppressWarnings("unchecked")
@Override
public EList<String> getStringListValue() {
return (EList<String>)eDynamicGet(NattablestylePackage.STRING_LIST_VALUE_STYLE__STRING_LIST_VALUE - ESTATIC_FEATURE_COUNT, NattablestylePackage.Literals.STRING_LIST_VALUE_STYLE__STRING_LIST_VALUE, true, true);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case NattablestylePackage.STRING_LIST_VALUE_STYLE__STRING_LIST_VALUE:
return getStringListValue();
}
return super.eGet(featureID, resolve, coreType);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@SuppressWarnings("unchecked")
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case NattablestylePackage.STRING_LIST_VALUE_STYLE__STRING_LIST_VALUE:
getStringListValue().clear();
getStringListValue().addAll((Collection<? extends String>)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case NattablestylePackage.STRING_LIST_VALUE_STYLE__STRING_LIST_VALUE:
getStringListValue().clear();
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case NattablestylePackage.STRING_LIST_VALUE_STYLE__STRING_LIST_VALUE:
return !getStringListValue().isEmpty();
}
return super.eIsSet(featureID);
}
} // StringListValueStyleImpl