001/** 002 */ 003package org.nasdanika.html.model.bootstrap.impl; 004 005import java.util.Collection; 006 007import org.eclipse.emf.common.notify.NotificationChain; 008 009import org.eclipse.emf.common.util.EList; 010 011import org.eclipse.emf.ecore.EClass; 012import org.eclipse.emf.ecore.InternalEObject; 013 014import org.eclipse.emf.ecore.util.InternalEList; 015 016import org.nasdanika.html.model.bootstrap.BootstrapPackage; 017import org.nasdanika.html.model.bootstrap.Column; 018import org.nasdanika.html.model.bootstrap.ColumnWidth; 019 020/** 021 * <!-- begin-user-doc --> 022 * An implementation of the model object '<em><b>Column</b></em>'. 023 * <!-- end-user-doc --> 024 * <p> 025 * The following features are implemented: 026 * </p> 027 * <ul> 028 * <li>{@link org.nasdanika.html.model.bootstrap.impl.ColumnImpl#getWidth <em>Width</em>}</li> 029 * </ul> 030 * 031 * @generated 032 */ 033public class ColumnImpl extends BootstrapElementImpl implements Column { 034 /** 035 * <!-- begin-user-doc --> 036 * <!-- end-user-doc --> 037 * @generated 038 */ 039 protected ColumnImpl() { 040 super(); 041 } 042 043 /** 044 * <!-- begin-user-doc --> 045 * <!-- end-user-doc --> 046 * @generated 047 */ 048 @Override 049 protected EClass eStaticClass() { 050 return BootstrapPackage.Literals.COLUMN; 051 } 052 053 /** 054 * <!-- begin-user-doc --> 055 * <!-- end-user-doc --> 056 * @generated 057 */ 058 @SuppressWarnings("unchecked") 059 @Override 060 public EList<ColumnWidth> getWidth() { 061 return (EList<ColumnWidth>)eDynamicGet(BootstrapPackage.COLUMN__WIDTH, BootstrapPackage.Literals.COLUMN__WIDTH, true, true); 062 } 063 064 /** 065 * <!-- begin-user-doc --> 066 * <!-- end-user-doc --> 067 * @generated 068 */ 069 @Override 070 public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { 071 switch (featureID) { 072 case BootstrapPackage.COLUMN__WIDTH: 073 return ((InternalEList<?>)getWidth()).basicRemove(otherEnd, msgs); 074 } 075 return super.eInverseRemove(otherEnd, featureID, msgs); 076 } 077 078 /** 079 * <!-- begin-user-doc --> 080 * <!-- end-user-doc --> 081 * @generated 082 */ 083 @Override 084 public Object eGet(int featureID, boolean resolve, boolean coreType) { 085 switch (featureID) { 086 case BootstrapPackage.COLUMN__WIDTH: 087 return getWidth(); 088 } 089 return super.eGet(featureID, resolve, coreType); 090 } 091 092 /** 093 * <!-- begin-user-doc --> 094 * <!-- end-user-doc --> 095 * @generated 096 */ 097 @SuppressWarnings("unchecked") 098 @Override 099 public void eSet(int featureID, Object newValue) { 100 switch (featureID) { 101 case BootstrapPackage.COLUMN__WIDTH: 102 getWidth().clear(); 103 getWidth().addAll((Collection<? extends ColumnWidth>)newValue); 104 return; 105 } 106 super.eSet(featureID, newValue); 107 } 108 109 /** 110 * <!-- begin-user-doc --> 111 * <!-- end-user-doc --> 112 * @generated 113 */ 114 @Override 115 public void eUnset(int featureID) { 116 switch (featureID) { 117 case BootstrapPackage.COLUMN__WIDTH: 118 getWidth().clear(); 119 return; 120 } 121 super.eUnset(featureID); 122 } 123 124 /** 125 * <!-- begin-user-doc --> 126 * <!-- end-user-doc --> 127 * @generated 128 */ 129 @Override 130 public boolean eIsSet(int featureID) { 131 switch (featureID) { 132 case BootstrapPackage.COLUMN__WIDTH: 133 return !getWidth().isEmpty(); 134 } 135 return super.eIsSet(featureID); 136 } 137 138} //ColumnImpl