|
@@ -134,7 +134,7 @@ public abstract class DocumentBase
|
|
|
protected DocumentBase(File pFile)
|
|
|
{
|
|
|
_file = pFile;
|
|
|
- _tables = new FastMap<String, String[]>();
|
|
|
+ _tables = new FastMap<>();
|
|
|
}
|
|
|
|
|
|
public Document parse()
|
|
@@ -174,7 +174,7 @@ public abstract class DocumentBase
|
|
|
|
|
|
protected void resetTable()
|
|
|
{
|
|
|
- _tables = new FastMap<String, String[]>();
|
|
|
+ _tables = new FastMap<>();
|
|
|
}
|
|
|
|
|
|
protected void setTable(String name, String[] table)
|
|
@@ -636,7 +636,7 @@ public abstract class DocumentBase
|
|
|
else if ("clanHall".equalsIgnoreCase(a.getNodeName()))
|
|
|
{
|
|
|
StringTokenizer st = new StringTokenizer(a.getNodeValue(), ",");
|
|
|
- ArrayList<Integer> array = new ArrayList<Integer>(st.countTokens());
|
|
|
+ ArrayList<Integer> array = new ArrayList<>(st.countTokens());
|
|
|
while (st.hasMoreTokens())
|
|
|
{
|
|
|
String item = st.nextToken().trim();
|
|
@@ -701,7 +701,7 @@ public abstract class DocumentBase
|
|
|
else if ("class_id_restriction".equalsIgnoreCase(a.getNodeName()))
|
|
|
{
|
|
|
StringTokenizer st = new StringTokenizer(a.getNodeValue(), ",");
|
|
|
- ArrayList<Integer> array = new ArrayList<Integer>(st.countTokens());
|
|
|
+ ArrayList<Integer> array = new ArrayList<>(st.countTokens());
|
|
|
while (st.hasMoreTokens())
|
|
|
{
|
|
|
String item = st.nextToken().trim();
|
|
@@ -717,7 +717,7 @@ public abstract class DocumentBase
|
|
|
else if ("instanceId".equalsIgnoreCase(a.getNodeName()))
|
|
|
{
|
|
|
StringTokenizer st = new StringTokenizer(a.getNodeValue(), ",");
|
|
|
- ArrayList<Integer> array = new ArrayList<Integer>(st.countTokens());
|
|
|
+ ArrayList<Integer> array = new ArrayList<>(st.countTokens());
|
|
|
while (st.hasMoreTokens())
|
|
|
{
|
|
|
String item = st.nextToken().trim();
|
|
@@ -738,7 +738,7 @@ public abstract class DocumentBase
|
|
|
else if ("hasPet".equalsIgnoreCase(a.getNodeName()))
|
|
|
{
|
|
|
StringTokenizer st = new StringTokenizer(a.getNodeValue(), ",");
|
|
|
- ArrayList<Integer> array = new ArrayList<Integer>(st.countTokens());
|
|
|
+ ArrayList<Integer> array = new ArrayList<>(st.countTokens());
|
|
|
while (st.hasMoreTokens())
|
|
|
{
|
|
|
String item = st.nextToken().trim();
|
|
@@ -749,7 +749,7 @@ public abstract class DocumentBase
|
|
|
else if ("servitorNpcId".equalsIgnoreCase(a.getNodeName()))
|
|
|
{
|
|
|
StringTokenizer st = new StringTokenizer(a.getNodeValue(), ",");
|
|
|
- ArrayList<Integer> array = new ArrayList<Integer>(st.countTokens());
|
|
|
+ ArrayList<Integer> array = new ArrayList<>(st.countTokens());
|
|
|
while (st.hasMoreTokens())
|
|
|
{
|
|
|
String item = st.nextToken().trim();
|
|
@@ -776,7 +776,7 @@ public abstract class DocumentBase
|
|
|
else if ("insideZoneId".equalsIgnoreCase(a.getNodeName()))
|
|
|
{
|
|
|
StringTokenizer st = new StringTokenizer(a.getNodeValue(), ",");
|
|
|
- ArrayList<Integer> array = new ArrayList<Integer>(st.countTokens());
|
|
|
+ ArrayList<Integer> array = new ArrayList<>(st.countTokens());
|
|
|
while (st.hasMoreTokens())
|
|
|
{
|
|
|
String item = st.nextToken().trim();
|
|
@@ -822,7 +822,7 @@ public abstract class DocumentBase
|
|
|
else if ("class_id_restriction".equalsIgnoreCase(a.getNodeName()))
|
|
|
{
|
|
|
StringTokenizer st = new StringTokenizer(a.getNodeValue(), ",");
|
|
|
- ArrayList<Integer> array = new ArrayList<Integer>(st.countTokens());
|
|
|
+ ArrayList<Integer> array = new ArrayList<>(st.countTokens());
|
|
|
while (st.hasMoreTokens())
|
|
|
{
|
|
|
String item = st.nextToken().trim();
|
|
@@ -868,7 +868,7 @@ public abstract class DocumentBase
|
|
|
else if ("race_id".equalsIgnoreCase(a.getNodeName()))
|
|
|
{
|
|
|
StringTokenizer st = new StringTokenizer(a.getNodeValue(), ",");
|
|
|
- ArrayList<Integer> array = new ArrayList<Integer>(st.countTokens());
|
|
|
+ ArrayList<Integer> array = new ArrayList<>(st.countTokens());
|
|
|
while (st.hasMoreTokens())
|
|
|
{
|
|
|
String item = st.nextToken().trim();
|
|
@@ -919,7 +919,7 @@ public abstract class DocumentBase
|
|
|
else if ("npcId".equalsIgnoreCase(a.getNodeName()))
|
|
|
{
|
|
|
StringTokenizer st = new StringTokenizer(a.getNodeValue(), ",");
|
|
|
- ArrayList<Integer> array = new ArrayList<Integer>(st.countTokens());
|
|
|
+ ArrayList<Integer> array = new ArrayList<>(st.countTokens());
|
|
|
while (st.hasMoreTokens())
|
|
|
{
|
|
|
String item = st.nextToken().trim();
|
|
@@ -1050,7 +1050,7 @@ public abstract class DocumentBase
|
|
|
String name = attrs.getNamedItem("name").getNodeValue();
|
|
|
if (name.charAt(0) != '#') throw new IllegalArgumentException("Table name must start with #");
|
|
|
StringTokenizer data = new StringTokenizer(n.getFirstChild().getNodeValue());
|
|
|
- List<String> array = new ArrayList<String>(data.countTokens());
|
|
|
+ List<String> array = new ArrayList<>(data.countTokens());
|
|
|
while (data.hasMoreTokens())
|
|
|
array.add(data.nextToken());
|
|
|
setTable(name, array.toArray(new String[array.size()]));
|