enum LocationType { // can only contain 4 types TARGET, ENEMY, MAP_LOW, MAP_HIGH, ; static final LocationType[] values = LocationType.values(); }
public static LocationType getType(Cursor cursor) { return LocationType.values()[cursor.getInt(cursor.getColumnIndexOrThrow(C_TYPE))]; }