/** * Convert old style int representation to an enum. The enum returned is the one at the given * ordinal (ie this is the inverse of the mapping done by ordinal()). * * @param value one of the defined int values in DiagramAppearance * @return the corresponding StereotypeView enum */ public static StereotypeStyle getEnum(int value) { int counter = 0; for (StereotypeStyle sv : StereotypeStyle.values()) { if (counter == value) { return sv; } counter++; } return null; }