Unused methods removed
This commit is contained in:
@@ -22,7 +22,6 @@ import java.sql.Connection;
|
|||||||
import java.sql.PreparedStatement;
|
import java.sql.PreparedStatement;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
import java.util.EnumMap;
|
import java.util.EnumMap;
|
||||||
import java.util.EnumSet;
|
|
||||||
import java.util.concurrent.ConcurrentHashMap;
|
import java.util.concurrent.ConcurrentHashMap;
|
||||||
|
|
||||||
public enum DbManager {
|
public enum DbManager {
|
||||||
@@ -265,53 +264,6 @@ public enum DbManager {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static <E extends java.lang.Enum<E>> EnumSet<E> parseEnumSet(String mysqlSet, Class<E> enumClass) {
|
|
||||||
|
|
||||||
// Create empty output set of the passed Enum class
|
|
||||||
|
|
||||||
EnumSet<E> enumSet = EnumSet.noneOf(enumClass);
|
|
||||||
|
|
||||||
// Early exit for empty sets
|
|
||||||
|
|
||||||
if (mysqlSet.isEmpty())
|
|
||||||
return enumSet;
|
|
||||||
|
|
||||||
// Split set string and trim each element
|
|
||||||
|
|
||||||
String[] elements = mysqlSet.split(";");
|
|
||||||
|
|
||||||
for (String element : elements) {
|
|
||||||
|
|
||||||
element = element.trim();
|
|
||||||
|
|
||||||
// Parse the element into an enum; add to the output set
|
|
||||||
|
|
||||||
try {
|
|
||||||
E enumConstant = java.lang.Enum.valueOf(enumClass, element);
|
|
||||||
enumSet.add(enumConstant);
|
|
||||||
} catch (Exception e) {
|
|
||||||
Logger.error(" Parse error: " + mysqlSet);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Return the output set
|
|
||||||
|
|
||||||
return enumSet;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void printCacheCount(PlayerCharacter pc) {
|
|
||||||
ChatManager.chatSystemInfo(pc, "Cache Lists");
|
|
||||||
|
|
||||||
for (GameObjectType gameObjectType : GameObjectType.values()) {
|
|
||||||
|
|
||||||
if (objectCache.get(gameObjectType) == null)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
String ret = gameObjectType.name() + ": " + objectCache.get(gameObjectType).size();
|
|
||||||
ChatManager.chatSystemInfo(pc, ret + '\n');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return the conn
|
* @return the conn
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user