001/** 002 */ 003package org.nasdanika.models.gitlab; 004 005import java.util.Arrays; 006import java.util.Collections; 007import java.util.List; 008 009import org.eclipse.emf.common.util.Enumerator; 010 011/** 012 * <!-- begin-user-doc --> 013 * A representation of the literals of the enumeration '<em><b>Build Git Strategy</b></em>', 014 * and utility methods for working with them. 015 * <!-- end-user-doc --> 016 * @see org.nasdanika.models.gitlab.GitLabPackage#getBuildGitStrategy() 017 * @model 018 * @generated 019 */ 020public enum BuildGitStrategy implements Enumerator { 021 /** 022 * The '<em><b>Fetch</b></em>' literal object. 023 * <!-- begin-user-doc --> 024 * <!-- end-user-doc --> 025 * @see #FETCH_VALUE 026 * @generated 027 * @ordered 028 */ 029 FETCH(0, "Fetch", "Fetch"), 030 031 /** 032 * The '<em><b>Clone</b></em>' literal object. 033 * <!-- begin-user-doc --> 034 * <!-- end-user-doc --> 035 * @see #CLONE_VALUE 036 * @generated 037 * @ordered 038 */ 039 CLONE(1, "Clone", "Clone"); 040 041 /** 042 * The '<em><b>Fetch</b></em>' literal value. 043 * <!-- begin-user-doc --> 044 * <!-- end-user-doc --> 045 * @see #FETCH 046 * @model name="Fetch" 047 * @generated 048 * @ordered 049 */ 050 public static final int FETCH_VALUE = 0; 051 052 /** 053 * The '<em><b>Clone</b></em>' literal value. 054 * <!-- begin-user-doc --> 055 * <!-- end-user-doc --> 056 * @see #CLONE 057 * @model name="Clone" 058 * @generated 059 * @ordered 060 */ 061 public static final int CLONE_VALUE = 1; 062 063 /** 064 * An array of all the '<em><b>Build Git Strategy</b></em>' enumerators. 065 * <!-- begin-user-doc --> 066 * <!-- end-user-doc --> 067 * @generated 068 */ 069 private static final BuildGitStrategy[] VALUES_ARRAY = 070 new BuildGitStrategy[] { 071 FETCH, 072 CLONE, 073 }; 074 075 /** 076 * A public read-only list of all the '<em><b>Build Git Strategy</b></em>' enumerators. 077 * <!-- begin-user-doc --> 078 * <!-- end-user-doc --> 079 * @generated 080 */ 081 public static final List<BuildGitStrategy> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY)); 082 083 /** 084 * Returns the '<em><b>Build Git Strategy</b></em>' literal with the specified literal value. 085 * <!-- begin-user-doc --> 086 * <!-- end-user-doc --> 087 * @param literal the literal. 088 * @return the matching enumerator or <code>null</code>. 089 * @generated 090 */ 091 public static BuildGitStrategy get(String literal) { 092 for (int i = 0; i < VALUES_ARRAY.length; ++i) { 093 BuildGitStrategy result = VALUES_ARRAY[i]; 094 if (result.toString().equals(literal)) { 095 return result; 096 } 097 } 098 return null; 099 } 100 101 /** 102 * Returns the '<em><b>Build Git Strategy</b></em>' literal with the specified name. 103 * <!-- begin-user-doc --> 104 * <!-- end-user-doc --> 105 * @param name the name. 106 * @return the matching enumerator or <code>null</code>. 107 * @generated 108 */ 109 public static BuildGitStrategy getByName(String name) { 110 for (int i = 0; i < VALUES_ARRAY.length; ++i) { 111 BuildGitStrategy result = VALUES_ARRAY[i]; 112 if (result.getName().equals(name)) { 113 return result; 114 } 115 } 116 return null; 117 } 118 119 /** 120 * Returns the '<em><b>Build Git Strategy</b></em>' literal with the specified integer value. 121 * <!-- begin-user-doc --> 122 * <!-- end-user-doc --> 123 * @param value the integer value. 124 * @return the matching enumerator or <code>null</code>. 125 * @generated 126 */ 127 public static BuildGitStrategy get(int value) { 128 switch (value) { 129 case FETCH_VALUE: return FETCH; 130 case CLONE_VALUE: return CLONE; 131 } 132 return null; 133 } 134 135 /** 136 * <!-- begin-user-doc --> 137 * <!-- end-user-doc --> 138 * @generated 139 */ 140 private final int value; 141 142 /** 143 * <!-- begin-user-doc --> 144 * <!-- end-user-doc --> 145 * @generated 146 */ 147 private final String name; 148 149 /** 150 * <!-- begin-user-doc --> 151 * <!-- end-user-doc --> 152 * @generated 153 */ 154 private final String literal; 155 156 /** 157 * Only this class can construct instances. 158 * <!-- begin-user-doc --> 159 * <!-- end-user-doc --> 160 * @generated 161 */ 162 private BuildGitStrategy(int value, String name, String literal) { 163 this.value = value; 164 this.name = name; 165 this.literal = literal; 166 } 167 168 /** 169 * <!-- begin-user-doc --> 170 * <!-- end-user-doc --> 171 * @generated 172 */ 173 @Override 174 public int getValue() { 175 return value; 176 } 177 178 /** 179 * <!-- begin-user-doc --> 180 * <!-- end-user-doc --> 181 * @generated 182 */ 183 @Override 184 public String getName() { 185 return name; 186 } 187 188 /** 189 * <!-- begin-user-doc --> 190 * <!-- end-user-doc --> 191 * @generated 192 */ 193 @Override 194 public String getLiteral() { 195 return literal; 196 } 197 198 /** 199 * Returns the literal value of the enumerator, which is its string representation. 200 * <!-- begin-user-doc --> 201 * <!-- end-user-doc --> 202 * @generated 203 */ 204 @Override 205 public String toString() { 206 return literal; 207 } 208 209} //BuildGitStrategy