001/** 002 */ 003package org.nasdanika.rag.model.util; 004 005import org.eclipse.emf.ecore.EObject; 006import org.eclipse.emf.ecore.EPackage; 007 008import org.eclipse.emf.ecore.util.Switch; 009 010import org.nasdanika.ncore.StringIdentity; 011 012import org.nasdanika.rag.model.*; 013 014/** 015 * <!-- begin-user-doc --> 016 * The <b>Switch</b> for the model's inheritance hierarchy. 017 * It supports the call {@link #doSwitch(EObject) doSwitch(object)} 018 * to invoke the <code>caseXXX</code> method for each class of the model, 019 * starting with the actual class of the object 020 * and proceeding up the inheritance hierarchy 021 * until a non-null result is returned, 022 * which is the result of the switch. 023 * <!-- end-user-doc --> 024 * @see org.nasdanika.rag.model.RagPackage 025 * @generated 026 */ 027public class RagSwitch<T> extends Switch<T> { 028 /** 029 * The cached model package 030 * <!-- begin-user-doc --> 031 * <!-- end-user-doc --> 032 * @generated 033 */ 034 protected static RagPackage modelPackage; 035 036 /** 037 * Creates an instance of the switch. 038 * <!-- begin-user-doc --> 039 * <!-- end-user-doc --> 040 * @generated 041 */ 042 public RagSwitch() { 043 if (modelPackage == null) { 044 modelPackage = RagPackage.eINSTANCE; 045 } 046 } 047 048 /** 049 * Checks whether this is a switch for the given package. 050 * <!-- begin-user-doc --> 051 * <!-- end-user-doc --> 052 * @param ePackage the package in question. 053 * @return whether this is a switch for the given package. 054 * @generated 055 */ 056 @Override 057 protected boolean isSwitchFor(EPackage ePackage) { 058 return ePackage == modelPackage; 059 } 060 061 /** 062 * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result. 063 * <!-- begin-user-doc --> 064 * <!-- end-user-doc --> 065 * @return the first non-null result returned by a <code>caseXXX</code> call. 066 * @generated 067 */ 068 @Override 069 protected T doSwitch(int classifierID, EObject theEObject) { 070 switch (classifierID) { 071 case RagPackage.DOUBLE_VECTOR_STRING_ITEM: { 072 DoubleVectorStringItem doubleVectorStringItem = (DoubleVectorStringItem)theEObject; 073 T result = caseDoubleVectorStringItem(doubleVectorStringItem); 074 if (result == null) result = caseStringIdentity(doubleVectorStringItem); 075 if (result == null) result = defaultCase(theEObject); 076 return result; 077 } 078 case RagPackage.DOUBLE_VECTOR_STRING_STORE: { 079 DoubleVectorStringStore doubleVectorStringStore = (DoubleVectorStringStore)theEObject; 080 T result = caseDoubleVectorStringStore(doubleVectorStringStore); 081 if (result == null) result = defaultCase(theEObject); 082 return result; 083 } 084 case RagPackage.FLOAT_VECTOR_STRING_ITEM: { 085 FloatVectorStringItem floatVectorStringItem = (FloatVectorStringItem)theEObject; 086 T result = caseFloatVectorStringItem(floatVectorStringItem); 087 if (result == null) result = caseStringIdentity(floatVectorStringItem); 088 if (result == null) result = defaultCase(theEObject); 089 return result; 090 } 091 case RagPackage.FLOAT_VECTOR_STRING_STORE: { 092 FloatVectorStringStore floatVectorStringStore = (FloatVectorStringStore)theEObject; 093 T result = caseFloatVectorStringStore(floatVectorStringStore); 094 if (result == null) result = defaultCase(theEObject); 095 return result; 096 } 097 default: return defaultCase(theEObject); 098 } 099 } 100 101 /** 102 * Returns the result of interpreting the object as an instance of '<em>Double Vector String Item</em>'. 103 * <!-- begin-user-doc --> 104 * This implementation returns null; 105 * returning a non-null result will terminate the switch. 106 * <!-- end-user-doc --> 107 * @param object the target of the switch. 108 * @return the result of interpreting the object as an instance of '<em>Double Vector String Item</em>'. 109 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) 110 * @generated 111 */ 112 public T caseDoubleVectorStringItem(DoubleVectorStringItem object) { 113 return null; 114 } 115 116 /** 117 * Returns the result of interpreting the object as an instance of '<em>Double Vector String Store</em>'. 118 * <!-- begin-user-doc --> 119 * This implementation returns null; 120 * returning a non-null result will terminate the switch. 121 * <!-- end-user-doc --> 122 * @param object the target of the switch. 123 * @return the result of interpreting the object as an instance of '<em>Double Vector String Store</em>'. 124 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) 125 * @generated 126 */ 127 public T caseDoubleVectorStringStore(DoubleVectorStringStore object) { 128 return null; 129 } 130 131 /** 132 * Returns the result of interpreting the object as an instance of '<em>Float Vector String Item</em>'. 133 * <!-- begin-user-doc --> 134 * This implementation returns null; 135 * returning a non-null result will terminate the switch. 136 * <!-- end-user-doc --> 137 * @param object the target of the switch. 138 * @return the result of interpreting the object as an instance of '<em>Float Vector String Item</em>'. 139 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) 140 * @generated 141 */ 142 public T caseFloatVectorStringItem(FloatVectorStringItem object) { 143 return null; 144 } 145 146 /** 147 * Returns the result of interpreting the object as an instance of '<em>Float Vector String Store</em>'. 148 * <!-- begin-user-doc --> 149 * This implementation returns null; 150 * returning a non-null result will terminate the switch. 151 * <!-- end-user-doc --> 152 * @param object the target of the switch. 153 * @return the result of interpreting the object as an instance of '<em>Float Vector String Store</em>'. 154 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) 155 * @generated 156 */ 157 public T caseFloatVectorStringStore(FloatVectorStringStore object) { 158 return null; 159 } 160 161 /** 162 * Returns the result of interpreting the object as an instance of '<em>String Identity</em>'. 163 * <!-- begin-user-doc --> 164 * This implementation returns null; 165 * returning a non-null result will terminate the switch. 166 * <!-- end-user-doc --> 167 * @param object the target of the switch. 168 * @return the result of interpreting the object as an instance of '<em>String Identity</em>'. 169 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) 170 * @generated 171 */ 172 public T caseStringIdentity(StringIdentity object) { 173 return null; 174 } 175 176 /** 177 * Returns the result of interpreting the object as an instance of '<em>EObject</em>'. 178 * <!-- begin-user-doc --> 179 * This implementation returns null; 180 * returning a non-null result will terminate the switch, but this is the last case anyway. 181 * <!-- end-user-doc --> 182 * @param object the target of the switch. 183 * @return the result of interpreting the object as an instance of '<em>EObject</em>'. 184 * @see #doSwitch(org.eclipse.emf.ecore.EObject) 185 * @generated 186 */ 187 @Override 188 public T defaultCase(EObject object) { 189 return null; 190 } 191 192} //RagSwitch