blob: 99ae7dbd12ebb980f456a32fbb18fbc34a7cb177 [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 org.eclipse.emf.ecore.EClass;
import org.eclipse.papyrus.infra.nattable.model.nattable.nattablestyle.BooleanValueStyle;
import org.eclipse.papyrus.infra.nattable.model.nattable.nattablestyle.NattablestylePackage;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Boolean 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.BooleanValueStyleImpl#isBooleanValue <em>Boolean Value</em>}</li>
* </ul>
*
* @generated
*/
public class BooleanValueStyleImpl extends NamedStyleImpl implements BooleanValueStyle {
/**
* The default value of the '{@link #isBooleanValue() <em>Boolean Value</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #isBooleanValue()
* @generated
* @ordered
*/
protected static final boolean BOOLEAN_VALUE_EDEFAULT = false;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected BooleanValueStyleImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return NattablestylePackage.Literals.BOOLEAN_VALUE_STYLE;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean isBooleanValue() {
return (Boolean)eDynamicGet(NattablestylePackage.BOOLEAN_VALUE_STYLE__BOOLEAN_VALUE - ESTATIC_FEATURE_COUNT, NattablestylePackage.Literals.BOOLEAN_VALUE_STYLE__BOOLEAN_VALUE, true, true);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void setBooleanValue(boolean newBooleanValue) {
eDynamicSet(NattablestylePackage.BOOLEAN_VALUE_STYLE__BOOLEAN_VALUE - ESTATIC_FEATURE_COUNT, NattablestylePackage.Literals.BOOLEAN_VALUE_STYLE__BOOLEAN_VALUE, newBooleanValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case NattablestylePackage.BOOLEAN_VALUE_STYLE__BOOLEAN_VALUE:
return isBooleanValue();
}
return super.eGet(featureID, resolve, coreType);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case NattablestylePackage.BOOLEAN_VALUE_STYLE__BOOLEAN_VALUE:
setBooleanValue((Boolean)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case NattablestylePackage.BOOLEAN_VALUE_STYLE__BOOLEAN_VALUE:
setBooleanValue(BOOLEAN_VALUE_EDEFAULT);
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case NattablestylePackage.BOOLEAN_VALUE_STYLE__BOOLEAN_VALUE:
return isBooleanValue() != BOOLEAN_VALUE_EDEFAULT;
}
return super.eIsSet(featureID);
}
} // BooleanValueStyleImpl