public SystemHeroLevel getSystemHeroLevelByLevel(int color, int level) { List<SystemHeroLevel> levelList = super.getValue(color); for (SystemHeroLevel heroLevel : levelList) { if (heroLevel.getLevel() == level) return heroLevel; } return null; }
public SystemHeroLevel getSystemHeroLevel(int color, int exp) { SystemHeroLevel systemHeroLevel = null; List<SystemHeroLevel> levelList = super.getValue(color); for (SystemHeroLevel level : levelList) { if (systemHeroLevel == null) { systemHeroLevel = level; } else { if (level.getExp() <= exp && level.getLevel() > systemHeroLevel.getLevel()) { systemHeroLevel = level; } } } return systemHeroLevel; }
@Override protected Integer getCacheKey(SystemHeroLevel v) { return v.getColor(); }