Removed another duplicate contains method.

This commit is contained in:
MobiusDev
2018-05-07 20:00:11 +00:00
parent 6fce931e93
commit e79f56788d
2 changed files with 1 additions and 20 deletions

View File

@@ -47,7 +47,6 @@ import com.l2jmobius.gameserver.model.holders.DropHolder;
import com.l2jmobius.gameserver.model.holders.MinionHolder;
import com.l2jmobius.gameserver.model.holders.SkillHolder;
import com.l2jmobius.gameserver.model.skills.Skill;
import com.l2jmobius.gameserver.util.Util;
/**
* NPC data parser.
@@ -771,7 +770,7 @@ public class NpcData implements IGameXmlReader
*/
public List<L2NpcTemplate> getAllNpcOfClassType(String... classTypes)
{
return getTemplates(template -> Util.contains(classTypes, template.getType(), true));
return getTemplates(template -> CommonUtil.contains(classTypes, template.getType(), true));
}
public void loadNpcsSkillLearn()

View File

@@ -991,24 +991,6 @@ public final class Util
return false;
}
/**
* @param array - the array to look into
* @param obj - the object to search for
* @param ignoreCase
* @return {@code true} if the {@code array} contains the {@code obj}, {@code false} otherwise.
*/
public static boolean contains(String[] array, String obj, boolean ignoreCase)
{
for (String element : array)
{
if (element.equals(obj) || (ignoreCase && element.equalsIgnoreCase(obj)))
{
return true;
}
}
return false;
}
public static int parseNextInt(StringTokenizer st, int defaultVal)
{
try