Used List instead of ArrayList for declarations.
This commit is contained in:
parent
cedd794473
commit
61157a6d03
@ -21,6 +21,7 @@ import static org.l2jmobius.gameserver.ai.CtrlIntention.AI_INTENTION_FOLLOW;
|
|||||||
import static org.l2jmobius.gameserver.ai.CtrlIntention.AI_INTENTION_IDLE;
|
import static org.l2jmobius.gameserver.ai.CtrlIntention.AI_INTENTION_IDLE;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
import org.l2jmobius.gameserver.data.xml.impl.SkillData;
|
import org.l2jmobius.gameserver.data.xml.impl.SkillData;
|
||||||
import org.l2jmobius.gameserver.geoengine.GeoEngine;
|
import org.l2jmobius.gameserver.geoengine.GeoEngine;
|
||||||
@ -210,7 +211,7 @@ public class ScarletVanHalisha extends AbstractNpcAI
|
|||||||
|
|
||||||
private Creature getRandomTarget(Npc npc, Skill skill)
|
private Creature getRandomTarget(Npc npc, Skill skill)
|
||||||
{
|
{
|
||||||
final ArrayList<Creature> result = new ArrayList<>();
|
final List<Creature> result = new ArrayList<>();
|
||||||
{
|
{
|
||||||
for (PlayerInstance obj : npc.getInstanceWorld().getPlayers())
|
for (PlayerInstance obj : npc.getInstanceWorld().getPlayers())
|
||||||
{
|
{
|
||||||
|
@ -17,6 +17,7 @@
|
|||||||
package org.l2jmobius.gameserver.model.clientstrings;
|
package org.l2jmobius.gameserver.model.clientstrings;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Forsaiken, Zoey76
|
* @author Forsaiken, Zoey76
|
||||||
@ -31,7 +32,7 @@ public abstract class Builder
|
|||||||
|
|
||||||
public static Builder newBuilder(String text)
|
public static Builder newBuilder(String text)
|
||||||
{
|
{
|
||||||
final ArrayList<Builder> builders = new ArrayList<>();
|
final List<Builder> builders = new ArrayList<>();
|
||||||
|
|
||||||
int index1 = 0;
|
int index1 = 0;
|
||||||
int index2 = 0;
|
int index2 = 0;
|
||||||
|
@ -27,6 +27,7 @@ import java.util.Collection;
|
|||||||
import java.util.Comparator;
|
import java.util.Comparator;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.concurrent.ScheduledFuture;
|
import java.util.concurrent.ScheduledFuture;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
@ -69,7 +70,7 @@ public class ItemAuctionInstance
|
|||||||
private final int _instanceId;
|
private final int _instanceId;
|
||||||
private final AtomicInteger _auctionIds;
|
private final AtomicInteger _auctionIds;
|
||||||
private final Map<Integer, ItemAuction> _auctions;
|
private final Map<Integer, ItemAuction> _auctions;
|
||||||
private final ArrayList<AuctionItem> _items;
|
private final List<AuctionItem> _items;
|
||||||
private final AuctionDateGenerator _dateGenerator;
|
private final AuctionDateGenerator _dateGenerator;
|
||||||
|
|
||||||
private ItemAuction _currentAuction;
|
private ItemAuction _currentAuction;
|
||||||
@ -593,7 +594,7 @@ public class ItemAuctionInstance
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
final ArrayList<ItemAuctionBid> auctionBids = new ArrayList<>();
|
final List<ItemAuctionBid> auctionBids = new ArrayList<>();
|
||||||
try (PreparedStatement ps = con.prepareStatement(SELECT_PLAYERS_ID_BY_AUCTION_ID))
|
try (PreparedStatement ps = con.prepareStatement(SELECT_PLAYERS_ID_BY_AUCTION_ID))
|
||||||
{
|
{
|
||||||
ps.setInt(1, auctionId);
|
ps.setInt(1, auctionId);
|
||||||
|
@ -17,6 +17,7 @@
|
|||||||
package org.l2jmobius.gameserver.network.loginserverpackets.game;
|
package org.l2jmobius.gameserver.network.loginserverpackets.game;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
import org.l2jmobius.commons.network.BaseSendablePacket;
|
import org.l2jmobius.commons.network.BaseSendablePacket;
|
||||||
|
|
||||||
@ -25,7 +26,7 @@ import org.l2jmobius.commons.network.BaseSendablePacket;
|
|||||||
*/
|
*/
|
||||||
public class ServerStatus extends BaseSendablePacket
|
public class ServerStatus extends BaseSendablePacket
|
||||||
{
|
{
|
||||||
private final ArrayList<Attribute> _attributes;
|
private final List<Attribute> _attributes;
|
||||||
|
|
||||||
public static final String[] STATUS_STRING =
|
public static final String[] STATUS_STRING =
|
||||||
{
|
{
|
||||||
|
@ -29,6 +29,7 @@ import java.io.Reader;
|
|||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
import java.nio.charset.StandardCharsets;
|
import java.nio.charset.StandardCharsets;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
@ -304,7 +305,7 @@ public class CronParser
|
|||||||
size = line.length();
|
size = line.length();
|
||||||
|
|
||||||
// Splitting the line
|
// Splitting the line
|
||||||
final ArrayList<String> splitted = new ArrayList<>();
|
final List<String> splitted = new ArrayList<>();
|
||||||
StringBuilder current = null;
|
StringBuilder current = null;
|
||||||
boolean quotes = false;
|
boolean quotes = false;
|
||||||
for (int i = 0; i < size; i++)
|
for (int i = 0; i < size; i++)
|
||||||
@ -376,9 +377,9 @@ public class CronParser
|
|||||||
File stdinFile = null;
|
File stdinFile = null;
|
||||||
File stdoutFile = null;
|
File stdoutFile = null;
|
||||||
File stderrFile = null;
|
File stderrFile = null;
|
||||||
final ArrayList<String> envsList = new ArrayList<>();
|
final List<String> envsList = new ArrayList<>();
|
||||||
String command = null;
|
String command = null;
|
||||||
final ArrayList<String> argsList = new ArrayList<>();
|
final List<String> argsList = new ArrayList<>();
|
||||||
for (int i = 0; i < size; i++)
|
for (int i = 0; i < size; i++)
|
||||||
{
|
{
|
||||||
final String tk = splitted.get(i);
|
final String tk = splitted.get(i);
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
*/
|
*/
|
||||||
package org.l2jmobius.gameserver.util.cron4j;
|
package org.l2jmobius.gameserver.util.cron4j;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
@ -48,7 +48,7 @@ class DayOfMonthValueMatcher extends IntArrayValueMatcher
|
|||||||
* Builds the ValueMatcher.
|
* Builds the ValueMatcher.
|
||||||
* @param values An ArrayList of Integer elements, one for every value accepted by the matcher. The match() method will return true only if its parameter will be one of this list or the last-day-of-month setting applies.
|
* @param values An ArrayList of Integer elements, one for every value accepted by the matcher. The match() method will return true only if its parameter will be one of this list or the last-day-of-month setting applies.
|
||||||
*/
|
*/
|
||||||
public DayOfMonthValueMatcher(ArrayList<?> values)
|
public DayOfMonthValueMatcher(List<?> values)
|
||||||
{
|
{
|
||||||
super(values);
|
super(values);
|
||||||
}
|
}
|
||||||
|
@ -21,6 +21,7 @@ package org.l2jmobius.gameserver.util.cron4j;
|
|||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
@ -34,7 +35,7 @@ class FileTaskCollector implements TaskCollector
|
|||||||
/**
|
/**
|
||||||
* File list.
|
* File list.
|
||||||
*/
|
*/
|
||||||
private final ArrayList<File> files = new ArrayList<>();
|
private final List<File> files = new ArrayList<>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds a file.
|
* Adds a file.
|
||||||
|
@ -19,6 +19,7 @@
|
|||||||
package org.l2jmobius.gameserver.util.cron4j;
|
package org.l2jmobius.gameserver.util.cron4j;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
@ -37,17 +38,17 @@ class MemoryTaskCollector implements TaskCollector
|
|||||||
/**
|
/**
|
||||||
* The inner scheduling pattern list.
|
* The inner scheduling pattern list.
|
||||||
*/
|
*/
|
||||||
private final ArrayList<SchedulingPattern> patterns = new ArrayList<>();
|
private final List<SchedulingPattern> patterns = new ArrayList<>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The inner task list.
|
* The inner task list.
|
||||||
*/
|
*/
|
||||||
private final ArrayList<Task> tasks = new ArrayList<>();
|
private final List<Task> tasks = new ArrayList<>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* IDs for task-pattern couples.
|
* IDs for task-pattern couples.
|
||||||
*/
|
*/
|
||||||
private final ArrayList<String> ids = new ArrayList<>();
|
private final List<String> ids = new ArrayList<>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Counts how many task are currently collected by this collector.
|
* Counts how many task are currently collected by this collector.
|
||||||
|
@ -20,6 +20,7 @@ package org.l2jmobius.gameserver.util.cron4j;
|
|||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
import java.util.TimeZone;
|
import java.util.TimeZone;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -53,7 +54,7 @@ public class Scheduler
|
|||||||
/**
|
/**
|
||||||
* Registered {@link TaskCollector}s list.
|
* Registered {@link TaskCollector}s list.
|
||||||
*/
|
*/
|
||||||
private final ArrayList<TaskCollector> collectors = new ArrayList<>();
|
private final List<TaskCollector> collectors = new ArrayList<>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The {@link MemoryTaskCollector} used for memory stored tasks. Represented here for convenience, it is also the first element in the {@link Scheduler#collectors} list.
|
* The {@link MemoryTaskCollector} used for memory stored tasks. Represented here for convenience, it is also the first element in the {@link Scheduler#collectors} list.
|
||||||
@ -68,7 +69,7 @@ public class Scheduler
|
|||||||
/**
|
/**
|
||||||
* Registered {@link SchedulerListener}s list.
|
* Registered {@link SchedulerListener}s list.
|
||||||
*/
|
*/
|
||||||
private final ArrayList<SchedulerListener> listeners = new ArrayList<>();
|
private final List<SchedulerListener> listeners = new ArrayList<>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The thread checking the clock and requesting the spawning of launcher threads.
|
* The thread checking the clock and requesting the spawning of launcher threads.
|
||||||
@ -78,12 +79,12 @@ public class Scheduler
|
|||||||
/**
|
/**
|
||||||
* Currently running {@link LauncherThread} instances.
|
* Currently running {@link LauncherThread} instances.
|
||||||
*/
|
*/
|
||||||
private ArrayList<LauncherThread> launchers = null;
|
private List<LauncherThread> launchers = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Currently running {@link TaskExecutor} instances.
|
* Currently running {@link TaskExecutor} instances.
|
||||||
*/
|
*/
|
||||||
private ArrayList<TaskExecutor> executors = null;
|
private List<TaskExecutor> executors = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Internal lock, used to synchronize status-aware operations.
|
* Internal lock, used to synchronize status-aware operations.
|
||||||
|
@ -21,6 +21,7 @@ package org.l2jmobius.gameserver.util.cron4j;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
import java.util.GregorianCalendar;
|
import java.util.GregorianCalendar;
|
||||||
|
import java.util.List;
|
||||||
import java.util.StringTokenizer;
|
import java.util.StringTokenizer;
|
||||||
import java.util.TimeZone;
|
import java.util.TimeZone;
|
||||||
|
|
||||||
@ -165,27 +166,27 @@ public class SchedulingPattern
|
|||||||
/**
|
/**
|
||||||
* The ValueMatcher list for the "minute" field.
|
* The ValueMatcher list for the "minute" field.
|
||||||
*/
|
*/
|
||||||
protected ArrayList<ValueMatcher> minuteMatchers = new ArrayList<>();
|
protected List<ValueMatcher> minuteMatchers = new ArrayList<>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The ValueMatcher list for the "hour" field.
|
* The ValueMatcher list for the "hour" field.
|
||||||
*/
|
*/
|
||||||
protected ArrayList<ValueMatcher> hourMatchers = new ArrayList<>();
|
protected List<ValueMatcher> hourMatchers = new ArrayList<>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The ValueMatcher list for the "day of month" field.
|
* The ValueMatcher list for the "day of month" field.
|
||||||
*/
|
*/
|
||||||
protected ArrayList<ValueMatcher> dayOfMonthMatchers = new ArrayList<>();
|
protected List<ValueMatcher> dayOfMonthMatchers = new ArrayList<>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The ValueMatcher list for the "month" field.
|
* The ValueMatcher list for the "month" field.
|
||||||
*/
|
*/
|
||||||
protected ArrayList<ValueMatcher> monthMatchers = new ArrayList<>();
|
protected List<ValueMatcher> monthMatchers = new ArrayList<>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The ValueMatcher list for the "day of week" field.
|
* The ValueMatcher list for the "day of week" field.
|
||||||
*/
|
*/
|
||||||
protected ArrayList<ValueMatcher> dayOfWeekMatchers = new ArrayList<>();
|
protected List<ValueMatcher> dayOfWeekMatchers = new ArrayList<>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* How many matcher groups in this pattern?
|
* How many matcher groups in this pattern?
|
||||||
@ -270,12 +271,12 @@ public class SchedulingPattern
|
|||||||
{
|
{
|
||||||
return new AlwaysTrueValueMatcher();
|
return new AlwaysTrueValueMatcher();
|
||||||
}
|
}
|
||||||
final ArrayList<Object> values = new ArrayList<>();
|
final List<Object> values = new ArrayList<>();
|
||||||
final StringTokenizer st = new StringTokenizer(str, ",");
|
final StringTokenizer st = new StringTokenizer(str, ",");
|
||||||
while (st.hasMoreTokens())
|
while (st.hasMoreTokens())
|
||||||
{
|
{
|
||||||
final String element = st.nextToken();
|
final String element = st.nextToken();
|
||||||
ArrayList<Integer> local;
|
List<Integer> local;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
local = parseListElement(element, parser);
|
local = parseListElement(element, parser);
|
||||||
@ -311,7 +312,7 @@ public class SchedulingPattern
|
|||||||
* @return A list of integers representing the allowed values.
|
* @return A list of integers representing the allowed values.
|
||||||
* @throws Exception If the supplied pattern part is not valid.
|
* @throws Exception If the supplied pattern part is not valid.
|
||||||
*/
|
*/
|
||||||
private ArrayList<Integer> parseListElement(String str, ValueParser parser) throws Exception
|
private List<Integer> parseListElement(String str, ValueParser parser) throws Exception
|
||||||
{
|
{
|
||||||
final StringTokenizer st = new StringTokenizer(str, "/");
|
final StringTokenizer st = new StringTokenizer(str, "/");
|
||||||
final int size = st.countTokens();
|
final int size = st.countTokens();
|
||||||
@ -319,7 +320,7 @@ public class SchedulingPattern
|
|||||||
{
|
{
|
||||||
throw new Exception("syntax error");
|
throw new Exception("syntax error");
|
||||||
}
|
}
|
||||||
ArrayList<Integer> values;
|
List<Integer> values;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
values = parseRange(st.nextToken(), parser);
|
values = parseRange(st.nextToken(), parser);
|
||||||
@ -344,7 +345,7 @@ public class SchedulingPattern
|
|||||||
{
|
{
|
||||||
throw new Exception("non positive divisor \"" + div + "\"");
|
throw new Exception("non positive divisor \"" + div + "\"");
|
||||||
}
|
}
|
||||||
final ArrayList<Integer> values2 = new ArrayList<>();
|
final List<Integer> values2 = new ArrayList<>();
|
||||||
for (int i = 0; i < values.size(); i += div)
|
for (int i = 0; i < values.size(); i += div)
|
||||||
{
|
{
|
||||||
values2.add(values.get(i));
|
values2.add(values.get(i));
|
||||||
@ -361,13 +362,13 @@ public class SchedulingPattern
|
|||||||
* @return A list of integers representing the allowed values.
|
* @return A list of integers representing the allowed values.
|
||||||
* @throws Exception If the supplied pattern part is not valid.
|
* @throws Exception If the supplied pattern part is not valid.
|
||||||
*/
|
*/
|
||||||
private ArrayList<Integer> parseRange(String str, ValueParser parser) throws Exception
|
private List<Integer> parseRange(String str, ValueParser parser) throws Exception
|
||||||
{
|
{
|
||||||
if (str.equals("*"))
|
if (str.equals("*"))
|
||||||
{
|
{
|
||||||
final int min = parser.getMinValue();
|
final int min = parser.getMinValue();
|
||||||
final int max = parser.getMaxValue();
|
final int max = parser.getMaxValue();
|
||||||
final ArrayList<Integer> values = new ArrayList<>();
|
final List<Integer> values = new ArrayList<>();
|
||||||
for (int i = min; i <= max; i++)
|
for (int i = min; i <= max; i++)
|
||||||
{
|
{
|
||||||
values.add(i);
|
values.add(i);
|
||||||
@ -392,7 +393,7 @@ public class SchedulingPattern
|
|||||||
}
|
}
|
||||||
if (size == 1)
|
if (size == 1)
|
||||||
{
|
{
|
||||||
final ArrayList<Integer> values = new ArrayList<>();
|
final List<Integer> values = new ArrayList<>();
|
||||||
values.add(v1);
|
values.add(v1);
|
||||||
return values;
|
return values;
|
||||||
}
|
}
|
||||||
@ -406,7 +407,7 @@ public class SchedulingPattern
|
|||||||
{
|
{
|
||||||
throw new Exception("invalid value \"" + v2Str + "\", " + e.getMessage());
|
throw new Exception("invalid value \"" + v2Str + "\", " + e.getMessage());
|
||||||
}
|
}
|
||||||
final ArrayList<Integer> values = new ArrayList<>();
|
final List<Integer> values = new ArrayList<>();
|
||||||
if (v1 < v2)
|
if (v1 < v2)
|
||||||
{
|
{
|
||||||
for (int i = v1; i <= v2; i++)
|
for (int i = v1; i <= v2; i++)
|
||||||
|
@ -22,6 +22,7 @@ import java.io.IOException;
|
|||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.io.OutputStream;
|
import java.io.OutputStream;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
@ -35,7 +36,7 @@ class StreamBridge
|
|||||||
/**
|
/**
|
||||||
* Used to trace alive instances.
|
* Used to trace alive instances.
|
||||||
*/
|
*/
|
||||||
static ArrayList<StreamBridge> traced = new ArrayList<>();
|
static List<StreamBridge> traced = new ArrayList<>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A self-referece, for inner classes.
|
* A self-referece, for inner classes.
|
||||||
|
@ -19,6 +19,7 @@
|
|||||||
package org.l2jmobius.gameserver.util.cron4j;
|
package org.l2jmobius.gameserver.util.cron4j;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
@ -64,7 +65,7 @@ public class TaskExecutor
|
|||||||
/**
|
/**
|
||||||
* A list of {@link TaskExecutorListener} instances.
|
* A list of {@link TaskExecutorListener} instances.
|
||||||
*/
|
*/
|
||||||
private final ArrayList<TaskExecutorListener> listeners = new ArrayList<>();
|
private final List<TaskExecutorListener> listeners = new ArrayList<>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A time stamp reporting the start time of this thread.
|
* A time stamp reporting the start time of this thread.
|
||||||
|
@ -19,6 +19,7 @@
|
|||||||
package org.l2jmobius.gameserver.util.cron4j;
|
package org.l2jmobius.gameserver.util.cron4j;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
@ -37,12 +38,12 @@ public class TaskTable
|
|||||||
/**
|
/**
|
||||||
* Pattern list.
|
* Pattern list.
|
||||||
*/
|
*/
|
||||||
private final ArrayList<SchedulingPattern> patterns = new ArrayList<>();
|
private final List<SchedulingPattern> patterns = new ArrayList<>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Task list.
|
* Task list.
|
||||||
*/
|
*/
|
||||||
private final ArrayList<Task> tasks = new ArrayList<>();
|
private final List<Task> tasks = new ArrayList<>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds a task and an associated scheduling pattern to the table.
|
* Adds a task and an associated scheduling pattern to the table.
|
||||||
|
@ -17,6 +17,7 @@
|
|||||||
package ai.areas.AteliaFortress.AteliaManager;
|
package ai.areas.AteliaFortress.AteliaManager;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
import org.l2jmobius.commons.util.CommonUtil;
|
import org.l2jmobius.commons.util.CommonUtil;
|
||||||
import org.l2jmobius.gameserver.datatables.SpawnTable;
|
import org.l2jmobius.gameserver.datatables.SpawnTable;
|
||||||
@ -308,7 +309,7 @@ public class AteliaManager extends AbstractNpcAI
|
|||||||
private static final int SBCANCEL = 3600000; // Time 1 Hour
|
private static final int SBCANCEL = 3600000; // Time 1 Hour
|
||||||
private static final int DDESPAWN = 10800000; // Time 3 Hour
|
private static final int DDESPAWN = 10800000; // Time 3 Hour
|
||||||
|
|
||||||
static ArrayList<Npc> FortessSpawns = new ArrayList<>();
|
static List<Npc> FortessSpawns = new ArrayList<>();
|
||||||
|
|
||||||
private AteliaManager()
|
private AteliaManager()
|
||||||
{
|
{
|
||||||
|
@ -21,6 +21,7 @@ import static org.l2jmobius.gameserver.ai.CtrlIntention.AI_INTENTION_FOLLOW;
|
|||||||
import static org.l2jmobius.gameserver.ai.CtrlIntention.AI_INTENTION_IDLE;
|
import static org.l2jmobius.gameserver.ai.CtrlIntention.AI_INTENTION_IDLE;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
import org.l2jmobius.gameserver.data.xml.impl.SkillData;
|
import org.l2jmobius.gameserver.data.xml.impl.SkillData;
|
||||||
import org.l2jmobius.gameserver.geoengine.GeoEngine;
|
import org.l2jmobius.gameserver.geoengine.GeoEngine;
|
||||||
@ -210,7 +211,7 @@ public class ScarletVanHalisha extends AbstractNpcAI
|
|||||||
|
|
||||||
private Creature getRandomTarget(Npc npc, Skill skill)
|
private Creature getRandomTarget(Npc npc, Skill skill)
|
||||||
{
|
{
|
||||||
final ArrayList<Creature> result = new ArrayList<>();
|
final List<Creature> result = new ArrayList<>();
|
||||||
{
|
{
|
||||||
for (PlayerInstance obj : npc.getInstanceWorld().getPlayers())
|
for (PlayerInstance obj : npc.getInstanceWorld().getPlayers())
|
||||||
{
|
{
|
||||||
|
@ -106,7 +106,7 @@ public class Kelbim extends AbstractNpcAI
|
|||||||
private static GrandBossInstance _kelbimBoss;
|
private static GrandBossInstance _kelbimBoss;
|
||||||
private static long _lastAction;
|
private static long _lastAction;
|
||||||
private static int _bossStage;
|
private static int _bossStage;
|
||||||
private static ArrayList<Npc> _minions = new ArrayList<>();
|
private static List<Npc> _minions = new ArrayList<>();
|
||||||
|
|
||||||
public Kelbim()
|
public Kelbim()
|
||||||
{
|
{
|
||||||
|
@ -17,6 +17,7 @@
|
|||||||
package org.l2jmobius.gameserver.model.clientstrings;
|
package org.l2jmobius.gameserver.model.clientstrings;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Forsaiken, Zoey76
|
* @author Forsaiken, Zoey76
|
||||||
@ -31,7 +32,7 @@ public abstract class Builder
|
|||||||
|
|
||||||
public static Builder newBuilder(String text)
|
public static Builder newBuilder(String text)
|
||||||
{
|
{
|
||||||
final ArrayList<Builder> builders = new ArrayList<>();
|
final List<Builder> builders = new ArrayList<>();
|
||||||
|
|
||||||
int index1 = 0;
|
int index1 = 0;
|
||||||
int index2 = 0;
|
int index2 = 0;
|
||||||
|
@ -27,6 +27,7 @@ import java.util.Collection;
|
|||||||
import java.util.Comparator;
|
import java.util.Comparator;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.concurrent.ScheduledFuture;
|
import java.util.concurrent.ScheduledFuture;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
@ -69,7 +70,7 @@ public class ItemAuctionInstance
|
|||||||
private final int _instanceId;
|
private final int _instanceId;
|
||||||
private final AtomicInteger _auctionIds;
|
private final AtomicInteger _auctionIds;
|
||||||
private final Map<Integer, ItemAuction> _auctions;
|
private final Map<Integer, ItemAuction> _auctions;
|
||||||
private final ArrayList<AuctionItem> _items;
|
private final List<AuctionItem> _items;
|
||||||
private final AuctionDateGenerator _dateGenerator;
|
private final AuctionDateGenerator _dateGenerator;
|
||||||
|
|
||||||
private ItemAuction _currentAuction;
|
private ItemAuction _currentAuction;
|
||||||
@ -593,7 +594,7 @@ public class ItemAuctionInstance
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
final ArrayList<ItemAuctionBid> auctionBids = new ArrayList<>();
|
final List<ItemAuctionBid> auctionBids = new ArrayList<>();
|
||||||
try (PreparedStatement ps = con.prepareStatement(SELECT_PLAYERS_ID_BY_AUCTION_ID))
|
try (PreparedStatement ps = con.prepareStatement(SELECT_PLAYERS_ID_BY_AUCTION_ID))
|
||||||
{
|
{
|
||||||
ps.setInt(1, auctionId);
|
ps.setInt(1, auctionId);
|
||||||
|
@ -17,6 +17,7 @@
|
|||||||
package org.l2jmobius.gameserver.network.loginserverpackets.game;
|
package org.l2jmobius.gameserver.network.loginserverpackets.game;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
import org.l2jmobius.commons.network.BaseSendablePacket;
|
import org.l2jmobius.commons.network.BaseSendablePacket;
|
||||||
|
|
||||||
@ -25,7 +26,7 @@ import org.l2jmobius.commons.network.BaseSendablePacket;
|
|||||||
*/
|
*/
|
||||||
public class ServerStatus extends BaseSendablePacket
|
public class ServerStatus extends BaseSendablePacket
|
||||||
{
|
{
|
||||||
private final ArrayList<Attribute> _attributes;
|
private final List<Attribute> _attributes;
|
||||||
|
|
||||||
public static final String[] STATUS_STRING =
|
public static final String[] STATUS_STRING =
|
||||||
{
|
{
|
||||||
|
@ -29,6 +29,7 @@ import java.io.Reader;
|
|||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
import java.nio.charset.StandardCharsets;
|
import java.nio.charset.StandardCharsets;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
@ -304,7 +305,7 @@ public class CronParser
|
|||||||
size = line.length();
|
size = line.length();
|
||||||
|
|
||||||
// Splitting the line
|
// Splitting the line
|
||||||
final ArrayList<String> splitted = new ArrayList<>();
|
final List<String> splitted = new ArrayList<>();
|
||||||
StringBuilder current = null;
|
StringBuilder current = null;
|
||||||
boolean quotes = false;
|
boolean quotes = false;
|
||||||
for (int i = 0; i < size; i++)
|
for (int i = 0; i < size; i++)
|
||||||
@ -376,9 +377,9 @@ public class CronParser
|
|||||||
File stdinFile = null;
|
File stdinFile = null;
|
||||||
File stdoutFile = null;
|
File stdoutFile = null;
|
||||||
File stderrFile = null;
|
File stderrFile = null;
|
||||||
final ArrayList<String> envsList = new ArrayList<>();
|
final List<String> envsList = new ArrayList<>();
|
||||||
String command = null;
|
String command = null;
|
||||||
final ArrayList<String> argsList = new ArrayList<>();
|
final List<String> argsList = new ArrayList<>();
|
||||||
for (int i = 0; i < size; i++)
|
for (int i = 0; i < size; i++)
|
||||||
{
|
{
|
||||||
final String tk = splitted.get(i);
|
final String tk = splitted.get(i);
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
*/
|
*/
|
||||||
package org.l2jmobius.gameserver.util.cron4j;
|
package org.l2jmobius.gameserver.util.cron4j;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
@ -48,7 +48,7 @@ class DayOfMonthValueMatcher extends IntArrayValueMatcher
|
|||||||
* Builds the ValueMatcher.
|
* Builds the ValueMatcher.
|
||||||
* @param values An ArrayList of Integer elements, one for every value accepted by the matcher. The match() method will return true only if its parameter will be one of this list or the last-day-of-month setting applies.
|
* @param values An ArrayList of Integer elements, one for every value accepted by the matcher. The match() method will return true only if its parameter will be one of this list or the last-day-of-month setting applies.
|
||||||
*/
|
*/
|
||||||
public DayOfMonthValueMatcher(ArrayList<?> values)
|
public DayOfMonthValueMatcher(List<?> values)
|
||||||
{
|
{
|
||||||
super(values);
|
super(values);
|
||||||
}
|
}
|
||||||
|
@ -21,6 +21,7 @@ package org.l2jmobius.gameserver.util.cron4j;
|
|||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
@ -34,7 +35,7 @@ class FileTaskCollector implements TaskCollector
|
|||||||
/**
|
/**
|
||||||
* File list.
|
* File list.
|
||||||
*/
|
*/
|
||||||
private final ArrayList<File> files = new ArrayList<>();
|
private final List<File> files = new ArrayList<>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds a file.
|
* Adds a file.
|
||||||
|
@ -19,6 +19,7 @@
|
|||||||
package org.l2jmobius.gameserver.util.cron4j;
|
package org.l2jmobius.gameserver.util.cron4j;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
@ -37,17 +38,17 @@ class MemoryTaskCollector implements TaskCollector
|
|||||||
/**
|
/**
|
||||||
* The inner scheduling pattern list.
|
* The inner scheduling pattern list.
|
||||||
*/
|
*/
|
||||||
private final ArrayList<SchedulingPattern> patterns = new ArrayList<>();
|
private final List<SchedulingPattern> patterns = new ArrayList<>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The inner task list.
|
* The inner task list.
|
||||||
*/
|
*/
|
||||||
private final ArrayList<Task> tasks = new ArrayList<>();
|
private final List<Task> tasks = new ArrayList<>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* IDs for task-pattern couples.
|
* IDs for task-pattern couples.
|
||||||
*/
|
*/
|
||||||
private final ArrayList<String> ids = new ArrayList<>();
|
private final List<String> ids = new ArrayList<>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Counts how many task are currently collected by this collector.
|
* Counts how many task are currently collected by this collector.
|
||||||
|
@ -20,6 +20,7 @@ package org.l2jmobius.gameserver.util.cron4j;
|
|||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
import java.util.TimeZone;
|
import java.util.TimeZone;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -53,7 +54,7 @@ public class Scheduler
|
|||||||
/**
|
/**
|
||||||
* Registered {@link TaskCollector}s list.
|
* Registered {@link TaskCollector}s list.
|
||||||
*/
|
*/
|
||||||
private final ArrayList<TaskCollector> collectors = new ArrayList<>();
|
private final List<TaskCollector> collectors = new ArrayList<>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The {@link MemoryTaskCollector} used for memory stored tasks. Represented here for convenience, it is also the first element in the {@link Scheduler#collectors} list.
|
* The {@link MemoryTaskCollector} used for memory stored tasks. Represented here for convenience, it is also the first element in the {@link Scheduler#collectors} list.
|
||||||
@ -68,7 +69,7 @@ public class Scheduler
|
|||||||
/**
|
/**
|
||||||
* Registered {@link SchedulerListener}s list.
|
* Registered {@link SchedulerListener}s list.
|
||||||
*/
|
*/
|
||||||
private final ArrayList<SchedulerListener> listeners = new ArrayList<>();
|
private final List<SchedulerListener> listeners = new ArrayList<>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The thread checking the clock and requesting the spawning of launcher threads.
|
* The thread checking the clock and requesting the spawning of launcher threads.
|
||||||
@ -78,12 +79,12 @@ public class Scheduler
|
|||||||
/**
|
/**
|
||||||
* Currently running {@link LauncherThread} instances.
|
* Currently running {@link LauncherThread} instances.
|
||||||
*/
|
*/
|
||||||
private ArrayList<LauncherThread> launchers = null;
|
private List<LauncherThread> launchers = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Currently running {@link TaskExecutor} instances.
|
* Currently running {@link TaskExecutor} instances.
|
||||||
*/
|
*/
|
||||||
private ArrayList<TaskExecutor> executors = null;
|
private List<TaskExecutor> executors = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Internal lock, used to synchronize status-aware operations.
|
* Internal lock, used to synchronize status-aware operations.
|
||||||
|
@ -21,6 +21,7 @@ package org.l2jmobius.gameserver.util.cron4j;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
import java.util.GregorianCalendar;
|
import java.util.GregorianCalendar;
|
||||||
|
import java.util.List;
|
||||||
import java.util.StringTokenizer;
|
import java.util.StringTokenizer;
|
||||||
import java.util.TimeZone;
|
import java.util.TimeZone;
|
||||||
|
|
||||||
@ -165,27 +166,27 @@ public class SchedulingPattern
|
|||||||
/**
|
/**
|
||||||
* The ValueMatcher list for the "minute" field.
|
* The ValueMatcher list for the "minute" field.
|
||||||
*/
|
*/
|
||||||
protected ArrayList<ValueMatcher> minuteMatchers = new ArrayList<>();
|
protected List<ValueMatcher> minuteMatchers = new ArrayList<>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The ValueMatcher list for the "hour" field.
|
* The ValueMatcher list for the "hour" field.
|
||||||
*/
|
*/
|
||||||
protected ArrayList<ValueMatcher> hourMatchers = new ArrayList<>();
|
protected List<ValueMatcher> hourMatchers = new ArrayList<>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The ValueMatcher list for the "day of month" field.
|
* The ValueMatcher list for the "day of month" field.
|
||||||
*/
|
*/
|
||||||
protected ArrayList<ValueMatcher> dayOfMonthMatchers = new ArrayList<>();
|
protected List<ValueMatcher> dayOfMonthMatchers = new ArrayList<>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The ValueMatcher list for the "month" field.
|
* The ValueMatcher list for the "month" field.
|
||||||
*/
|
*/
|
||||||
protected ArrayList<ValueMatcher> monthMatchers = new ArrayList<>();
|
protected List<ValueMatcher> monthMatchers = new ArrayList<>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The ValueMatcher list for the "day of week" field.
|
* The ValueMatcher list for the "day of week" field.
|
||||||
*/
|
*/
|
||||||
protected ArrayList<ValueMatcher> dayOfWeekMatchers = new ArrayList<>();
|
protected List<ValueMatcher> dayOfWeekMatchers = new ArrayList<>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* How many matcher groups in this pattern?
|
* How many matcher groups in this pattern?
|
||||||
@ -270,12 +271,12 @@ public class SchedulingPattern
|
|||||||
{
|
{
|
||||||
return new AlwaysTrueValueMatcher();
|
return new AlwaysTrueValueMatcher();
|
||||||
}
|
}
|
||||||
final ArrayList<Object> values = new ArrayList<>();
|
final List<Object> values = new ArrayList<>();
|
||||||
final StringTokenizer st = new StringTokenizer(str, ",");
|
final StringTokenizer st = new StringTokenizer(str, ",");
|
||||||
while (st.hasMoreTokens())
|
while (st.hasMoreTokens())
|
||||||
{
|
{
|
||||||
final String element = st.nextToken();
|
final String element = st.nextToken();
|
||||||
ArrayList<Integer> local;
|
List<Integer> local;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
local = parseListElement(element, parser);
|
local = parseListElement(element, parser);
|
||||||
@ -311,7 +312,7 @@ public class SchedulingPattern
|
|||||||
* @return A list of integers representing the allowed values.
|
* @return A list of integers representing the allowed values.
|
||||||
* @throws Exception If the supplied pattern part is not valid.
|
* @throws Exception If the supplied pattern part is not valid.
|
||||||
*/
|
*/
|
||||||
private ArrayList<Integer> parseListElement(String str, ValueParser parser) throws Exception
|
private List<Integer> parseListElement(String str, ValueParser parser) throws Exception
|
||||||
{
|
{
|
||||||
final StringTokenizer st = new StringTokenizer(str, "/");
|
final StringTokenizer st = new StringTokenizer(str, "/");
|
||||||
final int size = st.countTokens();
|
final int size = st.countTokens();
|
||||||
@ -319,7 +320,7 @@ public class SchedulingPattern
|
|||||||
{
|
{
|
||||||
throw new Exception("syntax error");
|
throw new Exception("syntax error");
|
||||||
}
|
}
|
||||||
ArrayList<Integer> values;
|
List<Integer> values;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
values = parseRange(st.nextToken(), parser);
|
values = parseRange(st.nextToken(), parser);
|
||||||
@ -344,7 +345,7 @@ public class SchedulingPattern
|
|||||||
{
|
{
|
||||||
throw new Exception("non positive divisor \"" + div + "\"");
|
throw new Exception("non positive divisor \"" + div + "\"");
|
||||||
}
|
}
|
||||||
final ArrayList<Integer> values2 = new ArrayList<>();
|
final List<Integer> values2 = new ArrayList<>();
|
||||||
for (int i = 0; i < values.size(); i += div)
|
for (int i = 0; i < values.size(); i += div)
|
||||||
{
|
{
|
||||||
values2.add(values.get(i));
|
values2.add(values.get(i));
|
||||||
@ -361,13 +362,13 @@ public class SchedulingPattern
|
|||||||
* @return A list of integers representing the allowed values.
|
* @return A list of integers representing the allowed values.
|
||||||
* @throws Exception If the supplied pattern part is not valid.
|
* @throws Exception If the supplied pattern part is not valid.
|
||||||
*/
|
*/
|
||||||
private ArrayList<Integer> parseRange(String str, ValueParser parser) throws Exception
|
private List<Integer> parseRange(String str, ValueParser parser) throws Exception
|
||||||
{
|
{
|
||||||
if (str.equals("*"))
|
if (str.equals("*"))
|
||||||
{
|
{
|
||||||
final int min = parser.getMinValue();
|
final int min = parser.getMinValue();
|
||||||
final int max = parser.getMaxValue();
|
final int max = parser.getMaxValue();
|
||||||
final ArrayList<Integer> values = new ArrayList<>();
|
final List<Integer> values = new ArrayList<>();
|
||||||
for (int i = min; i <= max; i++)
|
for (int i = min; i <= max; i++)
|
||||||
{
|
{
|
||||||
values.add(i);
|
values.add(i);
|
||||||
@ -392,7 +393,7 @@ public class SchedulingPattern
|
|||||||
}
|
}
|
||||||
if (size == 1)
|
if (size == 1)
|
||||||
{
|
{
|
||||||
final ArrayList<Integer> values = new ArrayList<>();
|
final List<Integer> values = new ArrayList<>();
|
||||||
values.add(v1);
|
values.add(v1);
|
||||||
return values;
|
return values;
|
||||||
}
|
}
|
||||||
@ -406,7 +407,7 @@ public class SchedulingPattern
|
|||||||
{
|
{
|
||||||
throw new Exception("invalid value \"" + v2Str + "\", " + e.getMessage());
|
throw new Exception("invalid value \"" + v2Str + "\", " + e.getMessage());
|
||||||
}
|
}
|
||||||
final ArrayList<Integer> values = new ArrayList<>();
|
final List<Integer> values = new ArrayList<>();
|
||||||
if (v1 < v2)
|
if (v1 < v2)
|
||||||
{
|
{
|
||||||
for (int i = v1; i <= v2; i++)
|
for (int i = v1; i <= v2; i++)
|
||||||
|
@ -22,6 +22,7 @@ import java.io.IOException;
|
|||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.io.OutputStream;
|
import java.io.OutputStream;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
@ -35,7 +36,7 @@ class StreamBridge
|
|||||||
/**
|
/**
|
||||||
* Used to trace alive instances.
|
* Used to trace alive instances.
|
||||||
*/
|
*/
|
||||||
static ArrayList<StreamBridge> traced = new ArrayList<>();
|
static List<StreamBridge> traced = new ArrayList<>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A self-referece, for inner classes.
|
* A self-referece, for inner classes.
|
||||||
|
@ -19,6 +19,7 @@
|
|||||||
package org.l2jmobius.gameserver.util.cron4j;
|
package org.l2jmobius.gameserver.util.cron4j;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
@ -64,7 +65,7 @@ public class TaskExecutor
|
|||||||
/**
|
/**
|
||||||
* A list of {@link TaskExecutorListener} instances.
|
* A list of {@link TaskExecutorListener} instances.
|
||||||
*/
|
*/
|
||||||
private final ArrayList<TaskExecutorListener> listeners = new ArrayList<>();
|
private final List<TaskExecutorListener> listeners = new ArrayList<>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A time stamp reporting the start time of this thread.
|
* A time stamp reporting the start time of this thread.
|
||||||
|
@ -19,6 +19,7 @@
|
|||||||
package org.l2jmobius.gameserver.util.cron4j;
|
package org.l2jmobius.gameserver.util.cron4j;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
@ -37,12 +38,12 @@ public class TaskTable
|
|||||||
/**
|
/**
|
||||||
* Pattern list.
|
* Pattern list.
|
||||||
*/
|
*/
|
||||||
private final ArrayList<SchedulingPattern> patterns = new ArrayList<>();
|
private final List<SchedulingPattern> patterns = new ArrayList<>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Task list.
|
* Task list.
|
||||||
*/
|
*/
|
||||||
private final ArrayList<Task> tasks = new ArrayList<>();
|
private final List<Task> tasks = new ArrayList<>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds a task and an associated scheduling pattern to the table.
|
* Adds a task and an associated scheduling pattern to the table.
|
||||||
|
@ -17,6 +17,7 @@
|
|||||||
package ai.areas.AteliaFortress.AteliaManager;
|
package ai.areas.AteliaFortress.AteliaManager;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
import org.l2jmobius.commons.util.CommonUtil;
|
import org.l2jmobius.commons.util.CommonUtil;
|
||||||
import org.l2jmobius.gameserver.datatables.SpawnTable;
|
import org.l2jmobius.gameserver.datatables.SpawnTable;
|
||||||
@ -308,7 +309,7 @@ public class AteliaManager extends AbstractNpcAI
|
|||||||
private static final int SBCANCEL = 3600000; // Time 1 Hour
|
private static final int SBCANCEL = 3600000; // Time 1 Hour
|
||||||
private static final int DDESPAWN = 10800000; // Time 3 Hour
|
private static final int DDESPAWN = 10800000; // Time 3 Hour
|
||||||
|
|
||||||
static ArrayList<Npc> FortessSpawns = new ArrayList<>();
|
static List<Npc> FortessSpawns = new ArrayList<>();
|
||||||
|
|
||||||
private AteliaManager()
|
private AteliaManager()
|
||||||
{
|
{
|
||||||
|
@ -21,6 +21,7 @@ import static org.l2jmobius.gameserver.ai.CtrlIntention.AI_INTENTION_FOLLOW;
|
|||||||
import static org.l2jmobius.gameserver.ai.CtrlIntention.AI_INTENTION_IDLE;
|
import static org.l2jmobius.gameserver.ai.CtrlIntention.AI_INTENTION_IDLE;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
import org.l2jmobius.gameserver.data.xml.impl.SkillData;
|
import org.l2jmobius.gameserver.data.xml.impl.SkillData;
|
||||||
import org.l2jmobius.gameserver.geoengine.GeoEngine;
|
import org.l2jmobius.gameserver.geoengine.GeoEngine;
|
||||||
@ -210,7 +211,7 @@ public class ScarletVanHalisha extends AbstractNpcAI
|
|||||||
|
|
||||||
private Creature getRandomTarget(Npc npc, Skill skill)
|
private Creature getRandomTarget(Npc npc, Skill skill)
|
||||||
{
|
{
|
||||||
final ArrayList<Creature> result = new ArrayList<>();
|
final List<Creature> result = new ArrayList<>();
|
||||||
{
|
{
|
||||||
for (PlayerInstance obj : npc.getInstanceWorld().getPlayers())
|
for (PlayerInstance obj : npc.getInstanceWorld().getPlayers())
|
||||||
{
|
{
|
||||||
|
@ -106,7 +106,7 @@ public class Kelbim extends AbstractNpcAI
|
|||||||
private static GrandBossInstance _kelbimBoss;
|
private static GrandBossInstance _kelbimBoss;
|
||||||
private static long _lastAction;
|
private static long _lastAction;
|
||||||
private static int _bossStage;
|
private static int _bossStage;
|
||||||
private static ArrayList<Npc> _minions = new ArrayList<>();
|
private static List<Npc> _minions = new ArrayList<>();
|
||||||
|
|
||||||
public Kelbim()
|
public Kelbim()
|
||||||
{
|
{
|
||||||
|
@ -17,6 +17,7 @@
|
|||||||
package org.l2jmobius.gameserver.model.clientstrings;
|
package org.l2jmobius.gameserver.model.clientstrings;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Forsaiken, Zoey76
|
* @author Forsaiken, Zoey76
|
||||||
@ -31,7 +32,7 @@ public abstract class Builder
|
|||||||
|
|
||||||
public static Builder newBuilder(String text)
|
public static Builder newBuilder(String text)
|
||||||
{
|
{
|
||||||
final ArrayList<Builder> builders = new ArrayList<>();
|
final List<Builder> builders = new ArrayList<>();
|
||||||
|
|
||||||
int index1 = 0;
|
int index1 = 0;
|
||||||
int index2 = 0;
|
int index2 = 0;
|
||||||
|
@ -27,6 +27,7 @@ import java.util.Collection;
|
|||||||
import java.util.Comparator;
|
import java.util.Comparator;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.concurrent.ScheduledFuture;
|
import java.util.concurrent.ScheduledFuture;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
@ -69,7 +70,7 @@ public class ItemAuctionInstance
|
|||||||
private final int _instanceId;
|
private final int _instanceId;
|
||||||
private final AtomicInteger _auctionIds;
|
private final AtomicInteger _auctionIds;
|
||||||
private final Map<Integer, ItemAuction> _auctions;
|
private final Map<Integer, ItemAuction> _auctions;
|
||||||
private final ArrayList<AuctionItem> _items;
|
private final List<AuctionItem> _items;
|
||||||
private final AuctionDateGenerator _dateGenerator;
|
private final AuctionDateGenerator _dateGenerator;
|
||||||
|
|
||||||
private ItemAuction _currentAuction;
|
private ItemAuction _currentAuction;
|
||||||
@ -593,7 +594,7 @@ public class ItemAuctionInstance
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
final ArrayList<ItemAuctionBid> auctionBids = new ArrayList<>();
|
final List<ItemAuctionBid> auctionBids = new ArrayList<>();
|
||||||
try (PreparedStatement ps = con.prepareStatement(SELECT_PLAYERS_ID_BY_AUCTION_ID))
|
try (PreparedStatement ps = con.prepareStatement(SELECT_PLAYERS_ID_BY_AUCTION_ID))
|
||||||
{
|
{
|
||||||
ps.setInt(1, auctionId);
|
ps.setInt(1, auctionId);
|
||||||
|
@ -17,6 +17,7 @@
|
|||||||
package org.l2jmobius.gameserver.network.loginserverpackets.game;
|
package org.l2jmobius.gameserver.network.loginserverpackets.game;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
import org.l2jmobius.commons.network.BaseSendablePacket;
|
import org.l2jmobius.commons.network.BaseSendablePacket;
|
||||||
|
|
||||||
@ -25,7 +26,7 @@ import org.l2jmobius.commons.network.BaseSendablePacket;
|
|||||||
*/
|
*/
|
||||||
public class ServerStatus extends BaseSendablePacket
|
public class ServerStatus extends BaseSendablePacket
|
||||||
{
|
{
|
||||||
private final ArrayList<Attribute> _attributes;
|
private final List<Attribute> _attributes;
|
||||||
|
|
||||||
public static final String[] STATUS_STRING =
|
public static final String[] STATUS_STRING =
|
||||||
{
|
{
|
||||||
|
@ -29,6 +29,7 @@ import java.io.Reader;
|
|||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
import java.nio.charset.StandardCharsets;
|
import java.nio.charset.StandardCharsets;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
@ -304,7 +305,7 @@ public class CronParser
|
|||||||
size = line.length();
|
size = line.length();
|
||||||
|
|
||||||
// Splitting the line
|
// Splitting the line
|
||||||
final ArrayList<String> splitted = new ArrayList<>();
|
final List<String> splitted = new ArrayList<>();
|
||||||
StringBuilder current = null;
|
StringBuilder current = null;
|
||||||
boolean quotes = false;
|
boolean quotes = false;
|
||||||
for (int i = 0; i < size; i++)
|
for (int i = 0; i < size; i++)
|
||||||
@ -376,9 +377,9 @@ public class CronParser
|
|||||||
File stdinFile = null;
|
File stdinFile = null;
|
||||||
File stdoutFile = null;
|
File stdoutFile = null;
|
||||||
File stderrFile = null;
|
File stderrFile = null;
|
||||||
final ArrayList<String> envsList = new ArrayList<>();
|
final List<String> envsList = new ArrayList<>();
|
||||||
String command = null;
|
String command = null;
|
||||||
final ArrayList<String> argsList = new ArrayList<>();
|
final List<String> argsList = new ArrayList<>();
|
||||||
for (int i = 0; i < size; i++)
|
for (int i = 0; i < size; i++)
|
||||||
{
|
{
|
||||||
final String tk = splitted.get(i);
|
final String tk = splitted.get(i);
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
*/
|
*/
|
||||||
package org.l2jmobius.gameserver.util.cron4j;
|
package org.l2jmobius.gameserver.util.cron4j;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
@ -48,7 +48,7 @@ class DayOfMonthValueMatcher extends IntArrayValueMatcher
|
|||||||
* Builds the ValueMatcher.
|
* Builds the ValueMatcher.
|
||||||
* @param values An ArrayList of Integer elements, one for every value accepted by the matcher. The match() method will return true only if its parameter will be one of this list or the last-day-of-month setting applies.
|
* @param values An ArrayList of Integer elements, one for every value accepted by the matcher. The match() method will return true only if its parameter will be one of this list or the last-day-of-month setting applies.
|
||||||
*/
|
*/
|
||||||
public DayOfMonthValueMatcher(ArrayList<?> values)
|
public DayOfMonthValueMatcher(List<?> values)
|
||||||
{
|
{
|
||||||
super(values);
|
super(values);
|
||||||
}
|
}
|
||||||
|
@ -21,6 +21,7 @@ package org.l2jmobius.gameserver.util.cron4j;
|
|||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
@ -34,7 +35,7 @@ class FileTaskCollector implements TaskCollector
|
|||||||
/**
|
/**
|
||||||
* File list.
|
* File list.
|
||||||
*/
|
*/
|
||||||
private final ArrayList<File> files = new ArrayList<>();
|
private final List<File> files = new ArrayList<>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds a file.
|
* Adds a file.
|
||||||
|
@ -19,6 +19,7 @@
|
|||||||
package org.l2jmobius.gameserver.util.cron4j;
|
package org.l2jmobius.gameserver.util.cron4j;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
@ -37,17 +38,17 @@ class MemoryTaskCollector implements TaskCollector
|
|||||||
/**
|
/**
|
||||||
* The inner scheduling pattern list.
|
* The inner scheduling pattern list.
|
||||||
*/
|
*/
|
||||||
private final ArrayList<SchedulingPattern> patterns = new ArrayList<>();
|
private final List<SchedulingPattern> patterns = new ArrayList<>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The inner task list.
|
* The inner task list.
|
||||||
*/
|
*/
|
||||||
private final ArrayList<Task> tasks = new ArrayList<>();
|
private final List<Task> tasks = new ArrayList<>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* IDs for task-pattern couples.
|
* IDs for task-pattern couples.
|
||||||
*/
|
*/
|
||||||
private final ArrayList<String> ids = new ArrayList<>();
|
private final List<String> ids = new ArrayList<>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Counts how many task are currently collected by this collector.
|
* Counts how many task are currently collected by this collector.
|
||||||
|
@ -20,6 +20,7 @@ package org.l2jmobius.gameserver.util.cron4j;
|
|||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
import java.util.TimeZone;
|
import java.util.TimeZone;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -53,7 +54,7 @@ public class Scheduler
|
|||||||
/**
|
/**
|
||||||
* Registered {@link TaskCollector}s list.
|
* Registered {@link TaskCollector}s list.
|
||||||
*/
|
*/
|
||||||
private final ArrayList<TaskCollector> collectors = new ArrayList<>();
|
private final List<TaskCollector> collectors = new ArrayList<>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The {@link MemoryTaskCollector} used for memory stored tasks. Represented here for convenience, it is also the first element in the {@link Scheduler#collectors} list.
|
* The {@link MemoryTaskCollector} used for memory stored tasks. Represented here for convenience, it is also the first element in the {@link Scheduler#collectors} list.
|
||||||
@ -68,7 +69,7 @@ public class Scheduler
|
|||||||
/**
|
/**
|
||||||
* Registered {@link SchedulerListener}s list.
|
* Registered {@link SchedulerListener}s list.
|
||||||
*/
|
*/
|
||||||
private final ArrayList<SchedulerListener> listeners = new ArrayList<>();
|
private final List<SchedulerListener> listeners = new ArrayList<>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The thread checking the clock and requesting the spawning of launcher threads.
|
* The thread checking the clock and requesting the spawning of launcher threads.
|
||||||
@ -78,12 +79,12 @@ public class Scheduler
|
|||||||
/**
|
/**
|
||||||
* Currently running {@link LauncherThread} instances.
|
* Currently running {@link LauncherThread} instances.
|
||||||
*/
|
*/
|
||||||
private ArrayList<LauncherThread> launchers = null;
|
private List<LauncherThread> launchers = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Currently running {@link TaskExecutor} instances.
|
* Currently running {@link TaskExecutor} instances.
|
||||||
*/
|
*/
|
||||||
private ArrayList<TaskExecutor> executors = null;
|
private List<TaskExecutor> executors = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Internal lock, used to synchronize status-aware operations.
|
* Internal lock, used to synchronize status-aware operations.
|
||||||
|
@ -21,6 +21,7 @@ package org.l2jmobius.gameserver.util.cron4j;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
import java.util.GregorianCalendar;
|
import java.util.GregorianCalendar;
|
||||||
|
import java.util.List;
|
||||||
import java.util.StringTokenizer;
|
import java.util.StringTokenizer;
|
||||||
import java.util.TimeZone;
|
import java.util.TimeZone;
|
||||||
|
|
||||||
@ -165,27 +166,27 @@ public class SchedulingPattern
|
|||||||
/**
|
/**
|
||||||
* The ValueMatcher list for the "minute" field.
|
* The ValueMatcher list for the "minute" field.
|
||||||
*/
|
*/
|
||||||
protected ArrayList<ValueMatcher> minuteMatchers = new ArrayList<>();
|
protected List<ValueMatcher> minuteMatchers = new ArrayList<>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The ValueMatcher list for the "hour" field.
|
* The ValueMatcher list for the "hour" field.
|
||||||
*/
|
*/
|
||||||
protected ArrayList<ValueMatcher> hourMatchers = new ArrayList<>();
|
protected List<ValueMatcher> hourMatchers = new ArrayList<>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The ValueMatcher list for the "day of month" field.
|
* The ValueMatcher list for the "day of month" field.
|
||||||
*/
|
*/
|
||||||
protected ArrayList<ValueMatcher> dayOfMonthMatchers = new ArrayList<>();
|
protected List<ValueMatcher> dayOfMonthMatchers = new ArrayList<>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The ValueMatcher list for the "month" field.
|
* The ValueMatcher list for the "month" field.
|
||||||
*/
|
*/
|
||||||
protected ArrayList<ValueMatcher> monthMatchers = new ArrayList<>();
|
protected List<ValueMatcher> monthMatchers = new ArrayList<>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The ValueMatcher list for the "day of week" field.
|
* The ValueMatcher list for the "day of week" field.
|
||||||
*/
|
*/
|
||||||
protected ArrayList<ValueMatcher> dayOfWeekMatchers = new ArrayList<>();
|
protected List<ValueMatcher> dayOfWeekMatchers = new ArrayList<>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* How many matcher groups in this pattern?
|
* How many matcher groups in this pattern?
|
||||||
@ -270,12 +271,12 @@ public class SchedulingPattern
|
|||||||
{
|
{
|
||||||
return new AlwaysTrueValueMatcher();
|
return new AlwaysTrueValueMatcher();
|
||||||
}
|
}
|
||||||
final ArrayList<Object> values = new ArrayList<>();
|
final List<Object> values = new ArrayList<>();
|
||||||
final StringTokenizer st = new StringTokenizer(str, ",");
|
final StringTokenizer st = new StringTokenizer(str, ",");
|
||||||
while (st.hasMoreTokens())
|
while (st.hasMoreTokens())
|
||||||
{
|
{
|
||||||
final String element = st.nextToken();
|
final String element = st.nextToken();
|
||||||
ArrayList<Integer> local;
|
List<Integer> local;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
local = parseListElement(element, parser);
|
local = parseListElement(element, parser);
|
||||||
@ -311,7 +312,7 @@ public class SchedulingPattern
|
|||||||
* @return A list of integers representing the allowed values.
|
* @return A list of integers representing the allowed values.
|
||||||
* @throws Exception If the supplied pattern part is not valid.
|
* @throws Exception If the supplied pattern part is not valid.
|
||||||
*/
|
*/
|
||||||
private ArrayList<Integer> parseListElement(String str, ValueParser parser) throws Exception
|
private List<Integer> parseListElement(String str, ValueParser parser) throws Exception
|
||||||
{
|
{
|
||||||
final StringTokenizer st = new StringTokenizer(str, "/");
|
final StringTokenizer st = new StringTokenizer(str, "/");
|
||||||
final int size = st.countTokens();
|
final int size = st.countTokens();
|
||||||
@ -319,7 +320,7 @@ public class SchedulingPattern
|
|||||||
{
|
{
|
||||||
throw new Exception("syntax error");
|
throw new Exception("syntax error");
|
||||||
}
|
}
|
||||||
ArrayList<Integer> values;
|
List<Integer> values;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
values = parseRange(st.nextToken(), parser);
|
values = parseRange(st.nextToken(), parser);
|
||||||
@ -344,7 +345,7 @@ public class SchedulingPattern
|
|||||||
{
|
{
|
||||||
throw new Exception("non positive divisor \"" + div + "\"");
|
throw new Exception("non positive divisor \"" + div + "\"");
|
||||||
}
|
}
|
||||||
final ArrayList<Integer> values2 = new ArrayList<>();
|
final List<Integer> values2 = new ArrayList<>();
|
||||||
for (int i = 0; i < values.size(); i += div)
|
for (int i = 0; i < values.size(); i += div)
|
||||||
{
|
{
|
||||||
values2.add(values.get(i));
|
values2.add(values.get(i));
|
||||||
@ -361,13 +362,13 @@ public class SchedulingPattern
|
|||||||
* @return A list of integers representing the allowed values.
|
* @return A list of integers representing the allowed values.
|
||||||
* @throws Exception If the supplied pattern part is not valid.
|
* @throws Exception If the supplied pattern part is not valid.
|
||||||
*/
|
*/
|
||||||
private ArrayList<Integer> parseRange(String str, ValueParser parser) throws Exception
|
private List<Integer> parseRange(String str, ValueParser parser) throws Exception
|
||||||
{
|
{
|
||||||
if (str.equals("*"))
|
if (str.equals("*"))
|
||||||
{
|
{
|
||||||
final int min = parser.getMinValue();
|
final int min = parser.getMinValue();
|
||||||
final int max = parser.getMaxValue();
|
final int max = parser.getMaxValue();
|
||||||
final ArrayList<Integer> values = new ArrayList<>();
|
final List<Integer> values = new ArrayList<>();
|
||||||
for (int i = min; i <= max; i++)
|
for (int i = min; i <= max; i++)
|
||||||
{
|
{
|
||||||
values.add(i);
|
values.add(i);
|
||||||
@ -392,7 +393,7 @@ public class SchedulingPattern
|
|||||||
}
|
}
|
||||||
if (size == 1)
|
if (size == 1)
|
||||||
{
|
{
|
||||||
final ArrayList<Integer> values = new ArrayList<>();
|
final List<Integer> values = new ArrayList<>();
|
||||||
values.add(v1);
|
values.add(v1);
|
||||||
return values;
|
return values;
|
||||||
}
|
}
|
||||||
@ -406,7 +407,7 @@ public class SchedulingPattern
|
|||||||
{
|
{
|
||||||
throw new Exception("invalid value \"" + v2Str + "\", " + e.getMessage());
|
throw new Exception("invalid value \"" + v2Str + "\", " + e.getMessage());
|
||||||
}
|
}
|
||||||
final ArrayList<Integer> values = new ArrayList<>();
|
final List<Integer> values = new ArrayList<>();
|
||||||
if (v1 < v2)
|
if (v1 < v2)
|
||||||
{
|
{
|
||||||
for (int i = v1; i <= v2; i++)
|
for (int i = v1; i <= v2; i++)
|
||||||
|
@ -22,6 +22,7 @@ import java.io.IOException;
|
|||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.io.OutputStream;
|
import java.io.OutputStream;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
@ -35,7 +36,7 @@ class StreamBridge
|
|||||||
/**
|
/**
|
||||||
* Used to trace alive instances.
|
* Used to trace alive instances.
|
||||||
*/
|
*/
|
||||||
static ArrayList<StreamBridge> traced = new ArrayList<>();
|
static List<StreamBridge> traced = new ArrayList<>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A self-referece, for inner classes.
|
* A self-referece, for inner classes.
|
||||||
|
@ -19,6 +19,7 @@
|
|||||||
package org.l2jmobius.gameserver.util.cron4j;
|
package org.l2jmobius.gameserver.util.cron4j;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
@ -64,7 +65,7 @@ public class TaskExecutor
|
|||||||
/**
|
/**
|
||||||
* A list of {@link TaskExecutorListener} instances.
|
* A list of {@link TaskExecutorListener} instances.
|
||||||
*/
|
*/
|
||||||
private final ArrayList<TaskExecutorListener> listeners = new ArrayList<>();
|
private final List<TaskExecutorListener> listeners = new ArrayList<>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A time stamp reporting the start time of this thread.
|
* A time stamp reporting the start time of this thread.
|
||||||
|
@ -19,6 +19,7 @@
|
|||||||
package org.l2jmobius.gameserver.util.cron4j;
|
package org.l2jmobius.gameserver.util.cron4j;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
@ -37,12 +38,12 @@ public class TaskTable
|
|||||||
/**
|
/**
|
||||||
* Pattern list.
|
* Pattern list.
|
||||||
*/
|
*/
|
||||||
private final ArrayList<SchedulingPattern> patterns = new ArrayList<>();
|
private final List<SchedulingPattern> patterns = new ArrayList<>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Task list.
|
* Task list.
|
||||||
*/
|
*/
|
||||||
private final ArrayList<Task> tasks = new ArrayList<>();
|
private final List<Task> tasks = new ArrayList<>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds a task and an associated scheduling pattern to the table.
|
* Adds a task and an associated scheduling pattern to the table.
|
||||||
|
@ -17,6 +17,7 @@
|
|||||||
package ai.areas.AteliaFortress.AteliaManager;
|
package ai.areas.AteliaFortress.AteliaManager;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
import org.l2jmobius.commons.util.CommonUtil;
|
import org.l2jmobius.commons.util.CommonUtil;
|
||||||
import org.l2jmobius.gameserver.datatables.SpawnTable;
|
import org.l2jmobius.gameserver.datatables.SpawnTable;
|
||||||
@ -308,7 +309,7 @@ public class AteliaManager extends AbstractNpcAI
|
|||||||
private static final int SBCANCEL = 3600000; // Time 1 Hour
|
private static final int SBCANCEL = 3600000; // Time 1 Hour
|
||||||
private static final int DDESPAWN = 10800000; // Time 3 Hour
|
private static final int DDESPAWN = 10800000; // Time 3 Hour
|
||||||
|
|
||||||
static ArrayList<Npc> FortessSpawns = new ArrayList<>();
|
static List<Npc> FortessSpawns = new ArrayList<>();
|
||||||
|
|
||||||
private AteliaManager()
|
private AteliaManager()
|
||||||
{
|
{
|
||||||
|
@ -21,6 +21,7 @@ import static org.l2jmobius.gameserver.ai.CtrlIntention.AI_INTENTION_FOLLOW;
|
|||||||
import static org.l2jmobius.gameserver.ai.CtrlIntention.AI_INTENTION_IDLE;
|
import static org.l2jmobius.gameserver.ai.CtrlIntention.AI_INTENTION_IDLE;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
import org.l2jmobius.gameserver.data.xml.impl.SkillData;
|
import org.l2jmobius.gameserver.data.xml.impl.SkillData;
|
||||||
import org.l2jmobius.gameserver.geoengine.GeoEngine;
|
import org.l2jmobius.gameserver.geoengine.GeoEngine;
|
||||||
@ -210,7 +211,7 @@ public class ScarletVanHalisha extends AbstractNpcAI
|
|||||||
|
|
||||||
private Creature getRandomTarget(Npc npc, Skill skill)
|
private Creature getRandomTarget(Npc npc, Skill skill)
|
||||||
{
|
{
|
||||||
final ArrayList<Creature> result = new ArrayList<>();
|
final List<Creature> result = new ArrayList<>();
|
||||||
{
|
{
|
||||||
for (PlayerInstance obj : npc.getInstanceWorld().getPlayers())
|
for (PlayerInstance obj : npc.getInstanceWorld().getPlayers())
|
||||||
{
|
{
|
||||||
|
@ -106,7 +106,7 @@ public class Kelbim extends AbstractNpcAI
|
|||||||
private static GrandBossInstance _kelbimBoss;
|
private static GrandBossInstance _kelbimBoss;
|
||||||
private static long _lastAction;
|
private static long _lastAction;
|
||||||
private static int _bossStage;
|
private static int _bossStage;
|
||||||
private static ArrayList<Npc> _minions = new ArrayList<>();
|
private static List<Npc> _minions = new ArrayList<>();
|
||||||
|
|
||||||
public Kelbim()
|
public Kelbim()
|
||||||
{
|
{
|
||||||
|
@ -17,6 +17,7 @@
|
|||||||
package org.l2jmobius.gameserver.model.clientstrings;
|
package org.l2jmobius.gameserver.model.clientstrings;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Forsaiken, Zoey76
|
* @author Forsaiken, Zoey76
|
||||||
@ -31,7 +32,7 @@ public abstract class Builder
|
|||||||
|
|
||||||
public static Builder newBuilder(String text)
|
public static Builder newBuilder(String text)
|
||||||
{
|
{
|
||||||
final ArrayList<Builder> builders = new ArrayList<>();
|
final List<Builder> builders = new ArrayList<>();
|
||||||
|
|
||||||
int index1 = 0;
|
int index1 = 0;
|
||||||
int index2 = 0;
|
int index2 = 0;
|
||||||
|
@ -27,6 +27,7 @@ import java.util.Collection;
|
|||||||
import java.util.Comparator;
|
import java.util.Comparator;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.concurrent.ScheduledFuture;
|
import java.util.concurrent.ScheduledFuture;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
@ -69,7 +70,7 @@ public class ItemAuctionInstance
|
|||||||
private final int _instanceId;
|
private final int _instanceId;
|
||||||
private final AtomicInteger _auctionIds;
|
private final AtomicInteger _auctionIds;
|
||||||
private final Map<Integer, ItemAuction> _auctions;
|
private final Map<Integer, ItemAuction> _auctions;
|
||||||
private final ArrayList<AuctionItem> _items;
|
private final List<AuctionItem> _items;
|
||||||
private final AuctionDateGenerator _dateGenerator;
|
private final AuctionDateGenerator _dateGenerator;
|
||||||
|
|
||||||
private ItemAuction _currentAuction;
|
private ItemAuction _currentAuction;
|
||||||
@ -593,7 +594,7 @@ public class ItemAuctionInstance
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
final ArrayList<ItemAuctionBid> auctionBids = new ArrayList<>();
|
final List<ItemAuctionBid> auctionBids = new ArrayList<>();
|
||||||
try (PreparedStatement ps = con.prepareStatement(SELECT_PLAYERS_ID_BY_AUCTION_ID))
|
try (PreparedStatement ps = con.prepareStatement(SELECT_PLAYERS_ID_BY_AUCTION_ID))
|
||||||
{
|
{
|
||||||
ps.setInt(1, auctionId);
|
ps.setInt(1, auctionId);
|
||||||
|
@ -17,6 +17,7 @@
|
|||||||
package org.l2jmobius.gameserver.network.loginserverpackets.game;
|
package org.l2jmobius.gameserver.network.loginserverpackets.game;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
import org.l2jmobius.commons.network.BaseSendablePacket;
|
import org.l2jmobius.commons.network.BaseSendablePacket;
|
||||||
|
|
||||||
@ -25,7 +26,7 @@ import org.l2jmobius.commons.network.BaseSendablePacket;
|
|||||||
*/
|
*/
|
||||||
public class ServerStatus extends BaseSendablePacket
|
public class ServerStatus extends BaseSendablePacket
|
||||||
{
|
{
|
||||||
private final ArrayList<Attribute> _attributes;
|
private final List<Attribute> _attributes;
|
||||||
|
|
||||||
public static final String[] STATUS_STRING =
|
public static final String[] STATUS_STRING =
|
||||||
{
|
{
|
||||||
|
@ -29,6 +29,7 @@ import java.io.Reader;
|
|||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
import java.nio.charset.StandardCharsets;
|
import java.nio.charset.StandardCharsets;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
@ -304,7 +305,7 @@ public class CronParser
|
|||||||
size = line.length();
|
size = line.length();
|
||||||
|
|
||||||
// Splitting the line
|
// Splitting the line
|
||||||
final ArrayList<String> splitted = new ArrayList<>();
|
final List<String> splitted = new ArrayList<>();
|
||||||
StringBuilder current = null;
|
StringBuilder current = null;
|
||||||
boolean quotes = false;
|
boolean quotes = false;
|
||||||
for (int i = 0; i < size; i++)
|
for (int i = 0; i < size; i++)
|
||||||
@ -376,9 +377,9 @@ public class CronParser
|
|||||||
File stdinFile = null;
|
File stdinFile = null;
|
||||||
File stdoutFile = null;
|
File stdoutFile = null;
|
||||||
File stderrFile = null;
|
File stderrFile = null;
|
||||||
final ArrayList<String> envsList = new ArrayList<>();
|
final List<String> envsList = new ArrayList<>();
|
||||||
String command = null;
|
String command = null;
|
||||||
final ArrayList<String> argsList = new ArrayList<>();
|
final List<String> argsList = new ArrayList<>();
|
||||||
for (int i = 0; i < size; i++)
|
for (int i = 0; i < size; i++)
|
||||||
{
|
{
|
||||||
final String tk = splitted.get(i);
|
final String tk = splitted.get(i);
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
*/
|
*/
|
||||||
package org.l2jmobius.gameserver.util.cron4j;
|
package org.l2jmobius.gameserver.util.cron4j;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
@ -48,7 +48,7 @@ class DayOfMonthValueMatcher extends IntArrayValueMatcher
|
|||||||
* Builds the ValueMatcher.
|
* Builds the ValueMatcher.
|
||||||
* @param values An ArrayList of Integer elements, one for every value accepted by the matcher. The match() method will return true only if its parameter will be one of this list or the last-day-of-month setting applies.
|
* @param values An ArrayList of Integer elements, one for every value accepted by the matcher. The match() method will return true only if its parameter will be one of this list or the last-day-of-month setting applies.
|
||||||
*/
|
*/
|
||||||
public DayOfMonthValueMatcher(ArrayList<?> values)
|
public DayOfMonthValueMatcher(List<?> values)
|
||||||
{
|
{
|
||||||
super(values);
|
super(values);
|
||||||
}
|
}
|
||||||
|
@ -21,6 +21,7 @@ package org.l2jmobius.gameserver.util.cron4j;
|
|||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
@ -34,7 +35,7 @@ class FileTaskCollector implements TaskCollector
|
|||||||
/**
|
/**
|
||||||
* File list.
|
* File list.
|
||||||
*/
|
*/
|
||||||
private final ArrayList<File> files = new ArrayList<>();
|
private final List<File> files = new ArrayList<>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds a file.
|
* Adds a file.
|
||||||
|
@ -19,6 +19,7 @@
|
|||||||
package org.l2jmobius.gameserver.util.cron4j;
|
package org.l2jmobius.gameserver.util.cron4j;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
@ -37,17 +38,17 @@ class MemoryTaskCollector implements TaskCollector
|
|||||||
/**
|
/**
|
||||||
* The inner scheduling pattern list.
|
* The inner scheduling pattern list.
|
||||||
*/
|
*/
|
||||||
private final ArrayList<SchedulingPattern> patterns = new ArrayList<>();
|
private final List<SchedulingPattern> patterns = new ArrayList<>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The inner task list.
|
* The inner task list.
|
||||||
*/
|
*/
|
||||||
private final ArrayList<Task> tasks = new ArrayList<>();
|
private final List<Task> tasks = new ArrayList<>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* IDs for task-pattern couples.
|
* IDs for task-pattern couples.
|
||||||
*/
|
*/
|
||||||
private final ArrayList<String> ids = new ArrayList<>();
|
private final List<String> ids = new ArrayList<>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Counts how many task are currently collected by this collector.
|
* Counts how many task are currently collected by this collector.
|
||||||
|
@ -20,6 +20,7 @@ package org.l2jmobius.gameserver.util.cron4j;
|
|||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
import java.util.TimeZone;
|
import java.util.TimeZone;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -53,7 +54,7 @@ public class Scheduler
|
|||||||
/**
|
/**
|
||||||
* Registered {@link TaskCollector}s list.
|
* Registered {@link TaskCollector}s list.
|
||||||
*/
|
*/
|
||||||
private final ArrayList<TaskCollector> collectors = new ArrayList<>();
|
private final List<TaskCollector> collectors = new ArrayList<>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The {@link MemoryTaskCollector} used for memory stored tasks. Represented here for convenience, it is also the first element in the {@link Scheduler#collectors} list.
|
* The {@link MemoryTaskCollector} used for memory stored tasks. Represented here for convenience, it is also the first element in the {@link Scheduler#collectors} list.
|
||||||
@ -68,7 +69,7 @@ public class Scheduler
|
|||||||
/**
|
/**
|
||||||
* Registered {@link SchedulerListener}s list.
|
* Registered {@link SchedulerListener}s list.
|
||||||
*/
|
*/
|
||||||
private final ArrayList<SchedulerListener> listeners = new ArrayList<>();
|
private final List<SchedulerListener> listeners = new ArrayList<>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The thread checking the clock and requesting the spawning of launcher threads.
|
* The thread checking the clock and requesting the spawning of launcher threads.
|
||||||
@ -78,12 +79,12 @@ public class Scheduler
|
|||||||
/**
|
/**
|
||||||
* Currently running {@link LauncherThread} instances.
|
* Currently running {@link LauncherThread} instances.
|
||||||
*/
|
*/
|
||||||
private ArrayList<LauncherThread> launchers = null;
|
private List<LauncherThread> launchers = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Currently running {@link TaskExecutor} instances.
|
* Currently running {@link TaskExecutor} instances.
|
||||||
*/
|
*/
|
||||||
private ArrayList<TaskExecutor> executors = null;
|
private List<TaskExecutor> executors = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Internal lock, used to synchronize status-aware operations.
|
* Internal lock, used to synchronize status-aware operations.
|
||||||
|
@ -21,6 +21,7 @@ package org.l2jmobius.gameserver.util.cron4j;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
import java.util.GregorianCalendar;
|
import java.util.GregorianCalendar;
|
||||||
|
import java.util.List;
|
||||||
import java.util.StringTokenizer;
|
import java.util.StringTokenizer;
|
||||||
import java.util.TimeZone;
|
import java.util.TimeZone;
|
||||||
|
|
||||||
@ -165,27 +166,27 @@ public class SchedulingPattern
|
|||||||
/**
|
/**
|
||||||
* The ValueMatcher list for the "minute" field.
|
* The ValueMatcher list for the "minute" field.
|
||||||
*/
|
*/
|
||||||
protected ArrayList<ValueMatcher> minuteMatchers = new ArrayList<>();
|
protected List<ValueMatcher> minuteMatchers = new ArrayList<>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The ValueMatcher list for the "hour" field.
|
* The ValueMatcher list for the "hour" field.
|
||||||
*/
|
*/
|
||||||
protected ArrayList<ValueMatcher> hourMatchers = new ArrayList<>();
|
protected List<ValueMatcher> hourMatchers = new ArrayList<>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The ValueMatcher list for the "day of month" field.
|
* The ValueMatcher list for the "day of month" field.
|
||||||
*/
|
*/
|
||||||
protected ArrayList<ValueMatcher> dayOfMonthMatchers = new ArrayList<>();
|
protected List<ValueMatcher> dayOfMonthMatchers = new ArrayList<>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The ValueMatcher list for the "month" field.
|
* The ValueMatcher list for the "month" field.
|
||||||
*/
|
*/
|
||||||
protected ArrayList<ValueMatcher> monthMatchers = new ArrayList<>();
|
protected List<ValueMatcher> monthMatchers = new ArrayList<>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The ValueMatcher list for the "day of week" field.
|
* The ValueMatcher list for the "day of week" field.
|
||||||
*/
|
*/
|
||||||
protected ArrayList<ValueMatcher> dayOfWeekMatchers = new ArrayList<>();
|
protected List<ValueMatcher> dayOfWeekMatchers = new ArrayList<>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* How many matcher groups in this pattern?
|
* How many matcher groups in this pattern?
|
||||||
@ -270,12 +271,12 @@ public class SchedulingPattern
|
|||||||
{
|
{
|
||||||
return new AlwaysTrueValueMatcher();
|
return new AlwaysTrueValueMatcher();
|
||||||
}
|
}
|
||||||
final ArrayList<Object> values = new ArrayList<>();
|
final List<Object> values = new ArrayList<>();
|
||||||
final StringTokenizer st = new StringTokenizer(str, ",");
|
final StringTokenizer st = new StringTokenizer(str, ",");
|
||||||
while (st.hasMoreTokens())
|
while (st.hasMoreTokens())
|
||||||
{
|
{
|
||||||
final String element = st.nextToken();
|
final String element = st.nextToken();
|
||||||
ArrayList<Integer> local;
|
List<Integer> local;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
local = parseListElement(element, parser);
|
local = parseListElement(element, parser);
|
||||||
@ -311,7 +312,7 @@ public class SchedulingPattern
|
|||||||
* @return A list of integers representing the allowed values.
|
* @return A list of integers representing the allowed values.
|
||||||
* @throws Exception If the supplied pattern part is not valid.
|
* @throws Exception If the supplied pattern part is not valid.
|
||||||
*/
|
*/
|
||||||
private ArrayList<Integer> parseListElement(String str, ValueParser parser) throws Exception
|
private List<Integer> parseListElement(String str, ValueParser parser) throws Exception
|
||||||
{
|
{
|
||||||
final StringTokenizer st = new StringTokenizer(str, "/");
|
final StringTokenizer st = new StringTokenizer(str, "/");
|
||||||
final int size = st.countTokens();
|
final int size = st.countTokens();
|
||||||
@ -319,7 +320,7 @@ public class SchedulingPattern
|
|||||||
{
|
{
|
||||||
throw new Exception("syntax error");
|
throw new Exception("syntax error");
|
||||||
}
|
}
|
||||||
ArrayList<Integer> values;
|
List<Integer> values;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
values = parseRange(st.nextToken(), parser);
|
values = parseRange(st.nextToken(), parser);
|
||||||
@ -344,7 +345,7 @@ public class SchedulingPattern
|
|||||||
{
|
{
|
||||||
throw new Exception("non positive divisor \"" + div + "\"");
|
throw new Exception("non positive divisor \"" + div + "\"");
|
||||||
}
|
}
|
||||||
final ArrayList<Integer> values2 = new ArrayList<>();
|
final List<Integer> values2 = new ArrayList<>();
|
||||||
for (int i = 0; i < values.size(); i += div)
|
for (int i = 0; i < values.size(); i += div)
|
||||||
{
|
{
|
||||||
values2.add(values.get(i));
|
values2.add(values.get(i));
|
||||||
@ -361,13 +362,13 @@ public class SchedulingPattern
|
|||||||
* @return A list of integers representing the allowed values.
|
* @return A list of integers representing the allowed values.
|
||||||
* @throws Exception If the supplied pattern part is not valid.
|
* @throws Exception If the supplied pattern part is not valid.
|
||||||
*/
|
*/
|
||||||
private ArrayList<Integer> parseRange(String str, ValueParser parser) throws Exception
|
private List<Integer> parseRange(String str, ValueParser parser) throws Exception
|
||||||
{
|
{
|
||||||
if (str.equals("*"))
|
if (str.equals("*"))
|
||||||
{
|
{
|
||||||
final int min = parser.getMinValue();
|
final int min = parser.getMinValue();
|
||||||
final int max = parser.getMaxValue();
|
final int max = parser.getMaxValue();
|
||||||
final ArrayList<Integer> values = new ArrayList<>();
|
final List<Integer> values = new ArrayList<>();
|
||||||
for (int i = min; i <= max; i++)
|
for (int i = min; i <= max; i++)
|
||||||
{
|
{
|
||||||
values.add(i);
|
values.add(i);
|
||||||
@ -392,7 +393,7 @@ public class SchedulingPattern
|
|||||||
}
|
}
|
||||||
if (size == 1)
|
if (size == 1)
|
||||||
{
|
{
|
||||||
final ArrayList<Integer> values = new ArrayList<>();
|
final List<Integer> values = new ArrayList<>();
|
||||||
values.add(v1);
|
values.add(v1);
|
||||||
return values;
|
return values;
|
||||||
}
|
}
|
||||||
@ -406,7 +407,7 @@ public class SchedulingPattern
|
|||||||
{
|
{
|
||||||
throw new Exception("invalid value \"" + v2Str + "\", " + e.getMessage());
|
throw new Exception("invalid value \"" + v2Str + "\", " + e.getMessage());
|
||||||
}
|
}
|
||||||
final ArrayList<Integer> values = new ArrayList<>();
|
final List<Integer> values = new ArrayList<>();
|
||||||
if (v1 < v2)
|
if (v1 < v2)
|
||||||
{
|
{
|
||||||
for (int i = v1; i <= v2; i++)
|
for (int i = v1; i <= v2; i++)
|
||||||
|
@ -22,6 +22,7 @@ import java.io.IOException;
|
|||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.io.OutputStream;
|
import java.io.OutputStream;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
@ -35,7 +36,7 @@ class StreamBridge
|
|||||||
/**
|
/**
|
||||||
* Used to trace alive instances.
|
* Used to trace alive instances.
|
||||||
*/
|
*/
|
||||||
static ArrayList<StreamBridge> traced = new ArrayList<>();
|
static List<StreamBridge> traced = new ArrayList<>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A self-referece, for inner classes.
|
* A self-referece, for inner classes.
|
||||||
|
@ -19,6 +19,7 @@
|
|||||||
package org.l2jmobius.gameserver.util.cron4j;
|
package org.l2jmobius.gameserver.util.cron4j;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
@ -64,7 +65,7 @@ public class TaskExecutor
|
|||||||
/**
|
/**
|
||||||
* A list of {@link TaskExecutorListener} instances.
|
* A list of {@link TaskExecutorListener} instances.
|
||||||
*/
|
*/
|
||||||
private final ArrayList<TaskExecutorListener> listeners = new ArrayList<>();
|
private final List<TaskExecutorListener> listeners = new ArrayList<>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A time stamp reporting the start time of this thread.
|
* A time stamp reporting the start time of this thread.
|
||||||
|
@ -19,6 +19,7 @@
|
|||||||
package org.l2jmobius.gameserver.util.cron4j;
|
package org.l2jmobius.gameserver.util.cron4j;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
@ -37,12 +38,12 @@ public class TaskTable
|
|||||||
/**
|
/**
|
||||||
* Pattern list.
|
* Pattern list.
|
||||||
*/
|
*/
|
||||||
private final ArrayList<SchedulingPattern> patterns = new ArrayList<>();
|
private final List<SchedulingPattern> patterns = new ArrayList<>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Task list.
|
* Task list.
|
||||||
*/
|
*/
|
||||||
private final ArrayList<Task> tasks = new ArrayList<>();
|
private final List<Task> tasks = new ArrayList<>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds a task and an associated scheduling pattern to the table.
|
* Adds a task and an associated scheduling pattern to the table.
|
||||||
|
@ -17,6 +17,7 @@
|
|||||||
package ai.areas.AteliaFortress.AteliaManager;
|
package ai.areas.AteliaFortress.AteliaManager;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
import org.l2jmobius.commons.util.CommonUtil;
|
import org.l2jmobius.commons.util.CommonUtil;
|
||||||
import org.l2jmobius.gameserver.datatables.SpawnTable;
|
import org.l2jmobius.gameserver.datatables.SpawnTable;
|
||||||
@ -308,7 +309,7 @@ public class AteliaManager extends AbstractNpcAI
|
|||||||
private static final int SBCANCEL = 3600000; // Time 1 Hour
|
private static final int SBCANCEL = 3600000; // Time 1 Hour
|
||||||
private static final int DDESPAWN = 10800000; // Time 3 Hour
|
private static final int DDESPAWN = 10800000; // Time 3 Hour
|
||||||
|
|
||||||
static ArrayList<Npc> FortessSpawns = new ArrayList<>();
|
static List<Npc> FortessSpawns = new ArrayList<>();
|
||||||
|
|
||||||
private AteliaManager()
|
private AteliaManager()
|
||||||
{
|
{
|
||||||
|
@ -21,6 +21,7 @@ import static org.l2jmobius.gameserver.ai.CtrlIntention.AI_INTENTION_FOLLOW;
|
|||||||
import static org.l2jmobius.gameserver.ai.CtrlIntention.AI_INTENTION_IDLE;
|
import static org.l2jmobius.gameserver.ai.CtrlIntention.AI_INTENTION_IDLE;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
import org.l2jmobius.gameserver.data.xml.impl.SkillData;
|
import org.l2jmobius.gameserver.data.xml.impl.SkillData;
|
||||||
import org.l2jmobius.gameserver.geoengine.GeoEngine;
|
import org.l2jmobius.gameserver.geoengine.GeoEngine;
|
||||||
@ -210,7 +211,7 @@ public class ScarletVanHalisha extends AbstractNpcAI
|
|||||||
|
|
||||||
private Creature getRandomTarget(Npc npc, Skill skill)
|
private Creature getRandomTarget(Npc npc, Skill skill)
|
||||||
{
|
{
|
||||||
final ArrayList<Creature> result = new ArrayList<>();
|
final List<Creature> result = new ArrayList<>();
|
||||||
{
|
{
|
||||||
for (PlayerInstance obj : npc.getInstanceWorld().getPlayers())
|
for (PlayerInstance obj : npc.getInstanceWorld().getPlayers())
|
||||||
{
|
{
|
||||||
|
@ -106,7 +106,7 @@ public class Kelbim extends AbstractNpcAI
|
|||||||
private static GrandBossInstance _kelbimBoss;
|
private static GrandBossInstance _kelbimBoss;
|
||||||
private static long _lastAction;
|
private static long _lastAction;
|
||||||
private static int _bossStage;
|
private static int _bossStage;
|
||||||
private static ArrayList<Npc> _minions = new ArrayList<>();
|
private static List<Npc> _minions = new ArrayList<>();
|
||||||
|
|
||||||
public Kelbim()
|
public Kelbim()
|
||||||
{
|
{
|
||||||
|
@ -17,6 +17,7 @@
|
|||||||
package org.l2jmobius.gameserver.model.clientstrings;
|
package org.l2jmobius.gameserver.model.clientstrings;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Forsaiken, Zoey76
|
* @author Forsaiken, Zoey76
|
||||||
@ -31,7 +32,7 @@ public abstract class Builder
|
|||||||
|
|
||||||
public static Builder newBuilder(String text)
|
public static Builder newBuilder(String text)
|
||||||
{
|
{
|
||||||
final ArrayList<Builder> builders = new ArrayList<>();
|
final List<Builder> builders = new ArrayList<>();
|
||||||
|
|
||||||
int index1 = 0;
|
int index1 = 0;
|
||||||
int index2 = 0;
|
int index2 = 0;
|
||||||
|
@ -27,6 +27,7 @@ import java.util.Collection;
|
|||||||
import java.util.Comparator;
|
import java.util.Comparator;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.concurrent.ScheduledFuture;
|
import java.util.concurrent.ScheduledFuture;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
@ -69,7 +70,7 @@ public class ItemAuctionInstance
|
|||||||
private final int _instanceId;
|
private final int _instanceId;
|
||||||
private final AtomicInteger _auctionIds;
|
private final AtomicInteger _auctionIds;
|
||||||
private final Map<Integer, ItemAuction> _auctions;
|
private final Map<Integer, ItemAuction> _auctions;
|
||||||
private final ArrayList<AuctionItem> _items;
|
private final List<AuctionItem> _items;
|
||||||
private final AuctionDateGenerator _dateGenerator;
|
private final AuctionDateGenerator _dateGenerator;
|
||||||
|
|
||||||
private ItemAuction _currentAuction;
|
private ItemAuction _currentAuction;
|
||||||
@ -593,7 +594,7 @@ public class ItemAuctionInstance
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
final ArrayList<ItemAuctionBid> auctionBids = new ArrayList<>();
|
final List<ItemAuctionBid> auctionBids = new ArrayList<>();
|
||||||
try (PreparedStatement ps = con.prepareStatement(SELECT_PLAYERS_ID_BY_AUCTION_ID))
|
try (PreparedStatement ps = con.prepareStatement(SELECT_PLAYERS_ID_BY_AUCTION_ID))
|
||||||
{
|
{
|
||||||
ps.setInt(1, auctionId);
|
ps.setInt(1, auctionId);
|
||||||
|
@ -17,6 +17,7 @@
|
|||||||
package org.l2jmobius.gameserver.network.loginserverpackets.game;
|
package org.l2jmobius.gameserver.network.loginserverpackets.game;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
import org.l2jmobius.commons.network.BaseSendablePacket;
|
import org.l2jmobius.commons.network.BaseSendablePacket;
|
||||||
|
|
||||||
@ -25,7 +26,7 @@ import org.l2jmobius.commons.network.BaseSendablePacket;
|
|||||||
*/
|
*/
|
||||||
public class ServerStatus extends BaseSendablePacket
|
public class ServerStatus extends BaseSendablePacket
|
||||||
{
|
{
|
||||||
private final ArrayList<Attribute> _attributes;
|
private final List<Attribute> _attributes;
|
||||||
|
|
||||||
public static final String[] STATUS_STRING =
|
public static final String[] STATUS_STRING =
|
||||||
{
|
{
|
||||||
|
@ -29,6 +29,7 @@ import java.io.Reader;
|
|||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
import java.nio.charset.StandardCharsets;
|
import java.nio.charset.StandardCharsets;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
@ -304,7 +305,7 @@ public class CronParser
|
|||||||
size = line.length();
|
size = line.length();
|
||||||
|
|
||||||
// Splitting the line
|
// Splitting the line
|
||||||
final ArrayList<String> splitted = new ArrayList<>();
|
final List<String> splitted = new ArrayList<>();
|
||||||
StringBuilder current = null;
|
StringBuilder current = null;
|
||||||
boolean quotes = false;
|
boolean quotes = false;
|
||||||
for (int i = 0; i < size; i++)
|
for (int i = 0; i < size; i++)
|
||||||
@ -376,9 +377,9 @@ public class CronParser
|
|||||||
File stdinFile = null;
|
File stdinFile = null;
|
||||||
File stdoutFile = null;
|
File stdoutFile = null;
|
||||||
File stderrFile = null;
|
File stderrFile = null;
|
||||||
final ArrayList<String> envsList = new ArrayList<>();
|
final List<String> envsList = new ArrayList<>();
|
||||||
String command = null;
|
String command = null;
|
||||||
final ArrayList<String> argsList = new ArrayList<>();
|
final List<String> argsList = new ArrayList<>();
|
||||||
for (int i = 0; i < size; i++)
|
for (int i = 0; i < size; i++)
|
||||||
{
|
{
|
||||||
final String tk = splitted.get(i);
|
final String tk = splitted.get(i);
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
*/
|
*/
|
||||||
package org.l2jmobius.gameserver.util.cron4j;
|
package org.l2jmobius.gameserver.util.cron4j;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
@ -48,7 +48,7 @@ class DayOfMonthValueMatcher extends IntArrayValueMatcher
|
|||||||
* Builds the ValueMatcher.
|
* Builds the ValueMatcher.
|
||||||
* @param values An ArrayList of Integer elements, one for every value accepted by the matcher. The match() method will return true only if its parameter will be one of this list or the last-day-of-month setting applies.
|
* @param values An ArrayList of Integer elements, one for every value accepted by the matcher. The match() method will return true only if its parameter will be one of this list or the last-day-of-month setting applies.
|
||||||
*/
|
*/
|
||||||
public DayOfMonthValueMatcher(ArrayList<?> values)
|
public DayOfMonthValueMatcher(List<?> values)
|
||||||
{
|
{
|
||||||
super(values);
|
super(values);
|
||||||
}
|
}
|
||||||
|
@ -21,6 +21,7 @@ package org.l2jmobius.gameserver.util.cron4j;
|
|||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
@ -34,7 +35,7 @@ class FileTaskCollector implements TaskCollector
|
|||||||
/**
|
/**
|
||||||
* File list.
|
* File list.
|
||||||
*/
|
*/
|
||||||
private final ArrayList<File> files = new ArrayList<>();
|
private final List<File> files = new ArrayList<>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds a file.
|
* Adds a file.
|
||||||
|
@ -19,6 +19,7 @@
|
|||||||
package org.l2jmobius.gameserver.util.cron4j;
|
package org.l2jmobius.gameserver.util.cron4j;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
@ -37,17 +38,17 @@ class MemoryTaskCollector implements TaskCollector
|
|||||||
/**
|
/**
|
||||||
* The inner scheduling pattern list.
|
* The inner scheduling pattern list.
|
||||||
*/
|
*/
|
||||||
private final ArrayList<SchedulingPattern> patterns = new ArrayList<>();
|
private final List<SchedulingPattern> patterns = new ArrayList<>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The inner task list.
|
* The inner task list.
|
||||||
*/
|
*/
|
||||||
private final ArrayList<Task> tasks = new ArrayList<>();
|
private final List<Task> tasks = new ArrayList<>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* IDs for task-pattern couples.
|
* IDs for task-pattern couples.
|
||||||
*/
|
*/
|
||||||
private final ArrayList<String> ids = new ArrayList<>();
|
private final List<String> ids = new ArrayList<>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Counts how many task are currently collected by this collector.
|
* Counts how many task are currently collected by this collector.
|
||||||
|
@ -20,6 +20,7 @@ package org.l2jmobius.gameserver.util.cron4j;
|
|||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
import java.util.TimeZone;
|
import java.util.TimeZone;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -53,7 +54,7 @@ public class Scheduler
|
|||||||
/**
|
/**
|
||||||
* Registered {@link TaskCollector}s list.
|
* Registered {@link TaskCollector}s list.
|
||||||
*/
|
*/
|
||||||
private final ArrayList<TaskCollector> collectors = new ArrayList<>();
|
private final List<TaskCollector> collectors = new ArrayList<>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The {@link MemoryTaskCollector} used for memory stored tasks. Represented here for convenience, it is also the first element in the {@link Scheduler#collectors} list.
|
* The {@link MemoryTaskCollector} used for memory stored tasks. Represented here for convenience, it is also the first element in the {@link Scheduler#collectors} list.
|
||||||
@ -68,7 +69,7 @@ public class Scheduler
|
|||||||
/**
|
/**
|
||||||
* Registered {@link SchedulerListener}s list.
|
* Registered {@link SchedulerListener}s list.
|
||||||
*/
|
*/
|
||||||
private final ArrayList<SchedulerListener> listeners = new ArrayList<>();
|
private final List<SchedulerListener> listeners = new ArrayList<>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The thread checking the clock and requesting the spawning of launcher threads.
|
* The thread checking the clock and requesting the spawning of launcher threads.
|
||||||
@ -78,12 +79,12 @@ public class Scheduler
|
|||||||
/**
|
/**
|
||||||
* Currently running {@link LauncherThread} instances.
|
* Currently running {@link LauncherThread} instances.
|
||||||
*/
|
*/
|
||||||
private ArrayList<LauncherThread> launchers = null;
|
private List<LauncherThread> launchers = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Currently running {@link TaskExecutor} instances.
|
* Currently running {@link TaskExecutor} instances.
|
||||||
*/
|
*/
|
||||||
private ArrayList<TaskExecutor> executors = null;
|
private List<TaskExecutor> executors = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Internal lock, used to synchronize status-aware operations.
|
* Internal lock, used to synchronize status-aware operations.
|
||||||
|
@ -21,6 +21,7 @@ package org.l2jmobius.gameserver.util.cron4j;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
import java.util.GregorianCalendar;
|
import java.util.GregorianCalendar;
|
||||||
|
import java.util.List;
|
||||||
import java.util.StringTokenizer;
|
import java.util.StringTokenizer;
|
||||||
import java.util.TimeZone;
|
import java.util.TimeZone;
|
||||||
|
|
||||||
@ -165,27 +166,27 @@ public class SchedulingPattern
|
|||||||
/**
|
/**
|
||||||
* The ValueMatcher list for the "minute" field.
|
* The ValueMatcher list for the "minute" field.
|
||||||
*/
|
*/
|
||||||
protected ArrayList<ValueMatcher> minuteMatchers = new ArrayList<>();
|
protected List<ValueMatcher> minuteMatchers = new ArrayList<>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The ValueMatcher list for the "hour" field.
|
* The ValueMatcher list for the "hour" field.
|
||||||
*/
|
*/
|
||||||
protected ArrayList<ValueMatcher> hourMatchers = new ArrayList<>();
|
protected List<ValueMatcher> hourMatchers = new ArrayList<>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The ValueMatcher list for the "day of month" field.
|
* The ValueMatcher list for the "day of month" field.
|
||||||
*/
|
*/
|
||||||
protected ArrayList<ValueMatcher> dayOfMonthMatchers = new ArrayList<>();
|
protected List<ValueMatcher> dayOfMonthMatchers = new ArrayList<>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The ValueMatcher list for the "month" field.
|
* The ValueMatcher list for the "month" field.
|
||||||
*/
|
*/
|
||||||
protected ArrayList<ValueMatcher> monthMatchers = new ArrayList<>();
|
protected List<ValueMatcher> monthMatchers = new ArrayList<>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The ValueMatcher list for the "day of week" field.
|
* The ValueMatcher list for the "day of week" field.
|
||||||
*/
|
*/
|
||||||
protected ArrayList<ValueMatcher> dayOfWeekMatchers = new ArrayList<>();
|
protected List<ValueMatcher> dayOfWeekMatchers = new ArrayList<>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* How many matcher groups in this pattern?
|
* How many matcher groups in this pattern?
|
||||||
@ -270,12 +271,12 @@ public class SchedulingPattern
|
|||||||
{
|
{
|
||||||
return new AlwaysTrueValueMatcher();
|
return new AlwaysTrueValueMatcher();
|
||||||
}
|
}
|
||||||
final ArrayList<Object> values = new ArrayList<>();
|
final List<Object> values = new ArrayList<>();
|
||||||
final StringTokenizer st = new StringTokenizer(str, ",");
|
final StringTokenizer st = new StringTokenizer(str, ",");
|
||||||
while (st.hasMoreTokens())
|
while (st.hasMoreTokens())
|
||||||
{
|
{
|
||||||
final String element = st.nextToken();
|
final String element = st.nextToken();
|
||||||
ArrayList<Integer> local;
|
List<Integer> local;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
local = parseListElement(element, parser);
|
local = parseListElement(element, parser);
|
||||||
@ -311,7 +312,7 @@ public class SchedulingPattern
|
|||||||
* @return A list of integers representing the allowed values.
|
* @return A list of integers representing the allowed values.
|
||||||
* @throws Exception If the supplied pattern part is not valid.
|
* @throws Exception If the supplied pattern part is not valid.
|
||||||
*/
|
*/
|
||||||
private ArrayList<Integer> parseListElement(String str, ValueParser parser) throws Exception
|
private List<Integer> parseListElement(String str, ValueParser parser) throws Exception
|
||||||
{
|
{
|
||||||
final StringTokenizer st = new StringTokenizer(str, "/");
|
final StringTokenizer st = new StringTokenizer(str, "/");
|
||||||
final int size = st.countTokens();
|
final int size = st.countTokens();
|
||||||
@ -319,7 +320,7 @@ public class SchedulingPattern
|
|||||||
{
|
{
|
||||||
throw new Exception("syntax error");
|
throw new Exception("syntax error");
|
||||||
}
|
}
|
||||||
ArrayList<Integer> values;
|
List<Integer> values;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
values = parseRange(st.nextToken(), parser);
|
values = parseRange(st.nextToken(), parser);
|
||||||
@ -344,7 +345,7 @@ public class SchedulingPattern
|
|||||||
{
|
{
|
||||||
throw new Exception("non positive divisor \"" + div + "\"");
|
throw new Exception("non positive divisor \"" + div + "\"");
|
||||||
}
|
}
|
||||||
final ArrayList<Integer> values2 = new ArrayList<>();
|
final List<Integer> values2 = new ArrayList<>();
|
||||||
for (int i = 0; i < values.size(); i += div)
|
for (int i = 0; i < values.size(); i += div)
|
||||||
{
|
{
|
||||||
values2.add(values.get(i));
|
values2.add(values.get(i));
|
||||||
@ -361,13 +362,13 @@ public class SchedulingPattern
|
|||||||
* @return A list of integers representing the allowed values.
|
* @return A list of integers representing the allowed values.
|
||||||
* @throws Exception If the supplied pattern part is not valid.
|
* @throws Exception If the supplied pattern part is not valid.
|
||||||
*/
|
*/
|
||||||
private ArrayList<Integer> parseRange(String str, ValueParser parser) throws Exception
|
private List<Integer> parseRange(String str, ValueParser parser) throws Exception
|
||||||
{
|
{
|
||||||
if (str.equals("*"))
|
if (str.equals("*"))
|
||||||
{
|
{
|
||||||
final int min = parser.getMinValue();
|
final int min = parser.getMinValue();
|
||||||
final int max = parser.getMaxValue();
|
final int max = parser.getMaxValue();
|
||||||
final ArrayList<Integer> values = new ArrayList<>();
|
final List<Integer> values = new ArrayList<>();
|
||||||
for (int i = min; i <= max; i++)
|
for (int i = min; i <= max; i++)
|
||||||
{
|
{
|
||||||
values.add(i);
|
values.add(i);
|
||||||
@ -392,7 +393,7 @@ public class SchedulingPattern
|
|||||||
}
|
}
|
||||||
if (size == 1)
|
if (size == 1)
|
||||||
{
|
{
|
||||||
final ArrayList<Integer> values = new ArrayList<>();
|
final List<Integer> values = new ArrayList<>();
|
||||||
values.add(v1);
|
values.add(v1);
|
||||||
return values;
|
return values;
|
||||||
}
|
}
|
||||||
@ -406,7 +407,7 @@ public class SchedulingPattern
|
|||||||
{
|
{
|
||||||
throw new Exception("invalid value \"" + v2Str + "\", " + e.getMessage());
|
throw new Exception("invalid value \"" + v2Str + "\", " + e.getMessage());
|
||||||
}
|
}
|
||||||
final ArrayList<Integer> values = new ArrayList<>();
|
final List<Integer> values = new ArrayList<>();
|
||||||
if (v1 < v2)
|
if (v1 < v2)
|
||||||
{
|
{
|
||||||
for (int i = v1; i <= v2; i++)
|
for (int i = v1; i <= v2; i++)
|
||||||
|
@ -22,6 +22,7 @@ import java.io.IOException;
|
|||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.io.OutputStream;
|
import java.io.OutputStream;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
@ -35,7 +36,7 @@ class StreamBridge
|
|||||||
/**
|
/**
|
||||||
* Used to trace alive instances.
|
* Used to trace alive instances.
|
||||||
*/
|
*/
|
||||||
static ArrayList<StreamBridge> traced = new ArrayList<>();
|
static List<StreamBridge> traced = new ArrayList<>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A self-referece, for inner classes.
|
* A self-referece, for inner classes.
|
||||||
|
@ -19,6 +19,7 @@
|
|||||||
package org.l2jmobius.gameserver.util.cron4j;
|
package org.l2jmobius.gameserver.util.cron4j;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
@ -64,7 +65,7 @@ public class TaskExecutor
|
|||||||
/**
|
/**
|
||||||
* A list of {@link TaskExecutorListener} instances.
|
* A list of {@link TaskExecutorListener} instances.
|
||||||
*/
|
*/
|
||||||
private final ArrayList<TaskExecutorListener> listeners = new ArrayList<>();
|
private final List<TaskExecutorListener> listeners = new ArrayList<>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A time stamp reporting the start time of this thread.
|
* A time stamp reporting the start time of this thread.
|
||||||
|
@ -19,6 +19,7 @@
|
|||||||
package org.l2jmobius.gameserver.util.cron4j;
|
package org.l2jmobius.gameserver.util.cron4j;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
@ -37,12 +38,12 @@ public class TaskTable
|
|||||||
/**
|
/**
|
||||||
* Pattern list.
|
* Pattern list.
|
||||||
*/
|
*/
|
||||||
private final ArrayList<SchedulingPattern> patterns = new ArrayList<>();
|
private final List<SchedulingPattern> patterns = new ArrayList<>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Task list.
|
* Task list.
|
||||||
*/
|
*/
|
||||||
private final ArrayList<Task> tasks = new ArrayList<>();
|
private final List<Task> tasks = new ArrayList<>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds a task and an associated scheduling pattern to the table.
|
* Adds a task and an associated scheduling pattern to the table.
|
||||||
|
@ -17,6 +17,7 @@
|
|||||||
package ai.areas.AteliaFortress.AteliaManager;
|
package ai.areas.AteliaFortress.AteliaManager;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
import org.l2jmobius.commons.util.CommonUtil;
|
import org.l2jmobius.commons.util.CommonUtil;
|
||||||
import org.l2jmobius.gameserver.datatables.SpawnTable;
|
import org.l2jmobius.gameserver.datatables.SpawnTable;
|
||||||
@ -308,7 +309,7 @@ public class AteliaManager extends AbstractNpcAI
|
|||||||
private static final int SBCANCEL = 3600000; // Time 1 Hour
|
private static final int SBCANCEL = 3600000; // Time 1 Hour
|
||||||
private static final int DDESPAWN = 10800000; // Time 3 Hour
|
private static final int DDESPAWN = 10800000; // Time 3 Hour
|
||||||
|
|
||||||
static ArrayList<Npc> FortessSpawns = new ArrayList<>();
|
static List<Npc> FortessSpawns = new ArrayList<>();
|
||||||
|
|
||||||
private AteliaManager()
|
private AteliaManager()
|
||||||
{
|
{
|
||||||
|
@ -21,6 +21,7 @@ import static org.l2jmobius.gameserver.ai.CtrlIntention.AI_INTENTION_FOLLOW;
|
|||||||
import static org.l2jmobius.gameserver.ai.CtrlIntention.AI_INTENTION_IDLE;
|
import static org.l2jmobius.gameserver.ai.CtrlIntention.AI_INTENTION_IDLE;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
import org.l2jmobius.gameserver.data.xml.impl.SkillData;
|
import org.l2jmobius.gameserver.data.xml.impl.SkillData;
|
||||||
import org.l2jmobius.gameserver.geoengine.GeoEngine;
|
import org.l2jmobius.gameserver.geoengine.GeoEngine;
|
||||||
@ -210,7 +211,7 @@ public class ScarletVanHalisha extends AbstractNpcAI
|
|||||||
|
|
||||||
private Creature getRandomTarget(Npc npc, Skill skill)
|
private Creature getRandomTarget(Npc npc, Skill skill)
|
||||||
{
|
{
|
||||||
final ArrayList<Creature> result = new ArrayList<>();
|
final List<Creature> result = new ArrayList<>();
|
||||||
{
|
{
|
||||||
for (PlayerInstance obj : npc.getInstanceWorld().getPlayers())
|
for (PlayerInstance obj : npc.getInstanceWorld().getPlayers())
|
||||||
{
|
{
|
||||||
|
@ -106,7 +106,7 @@ public class Kelbim extends AbstractNpcAI
|
|||||||
private static GrandBossInstance _kelbimBoss;
|
private static GrandBossInstance _kelbimBoss;
|
||||||
private static long _lastAction;
|
private static long _lastAction;
|
||||||
private static int _bossStage;
|
private static int _bossStage;
|
||||||
private static ArrayList<Npc> _minions = new ArrayList<>();
|
private static List<Npc> _minions = new ArrayList<>();
|
||||||
|
|
||||||
public Kelbim()
|
public Kelbim()
|
||||||
{
|
{
|
||||||
|
@ -17,6 +17,7 @@
|
|||||||
package org.l2jmobius.gameserver.model.clientstrings;
|
package org.l2jmobius.gameserver.model.clientstrings;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Forsaiken, Zoey76
|
* @author Forsaiken, Zoey76
|
||||||
@ -31,7 +32,7 @@ public abstract class Builder
|
|||||||
|
|
||||||
public static Builder newBuilder(String text)
|
public static Builder newBuilder(String text)
|
||||||
{
|
{
|
||||||
final ArrayList<Builder> builders = new ArrayList<>();
|
final List<Builder> builders = new ArrayList<>();
|
||||||
|
|
||||||
int index1 = 0;
|
int index1 = 0;
|
||||||
int index2 = 0;
|
int index2 = 0;
|
||||||
|
@ -27,6 +27,7 @@ import java.util.Collection;
|
|||||||
import java.util.Comparator;
|
import java.util.Comparator;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.concurrent.ScheduledFuture;
|
import java.util.concurrent.ScheduledFuture;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
@ -69,7 +70,7 @@ public class ItemAuctionInstance
|
|||||||
private final int _instanceId;
|
private final int _instanceId;
|
||||||
private final AtomicInteger _auctionIds;
|
private final AtomicInteger _auctionIds;
|
||||||
private final Map<Integer, ItemAuction> _auctions;
|
private final Map<Integer, ItemAuction> _auctions;
|
||||||
private final ArrayList<AuctionItem> _items;
|
private final List<AuctionItem> _items;
|
||||||
private final AuctionDateGenerator _dateGenerator;
|
private final AuctionDateGenerator _dateGenerator;
|
||||||
|
|
||||||
private ItemAuction _currentAuction;
|
private ItemAuction _currentAuction;
|
||||||
@ -593,7 +594,7 @@ public class ItemAuctionInstance
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
final ArrayList<ItemAuctionBid> auctionBids = new ArrayList<>();
|
final List<ItemAuctionBid> auctionBids = new ArrayList<>();
|
||||||
try (PreparedStatement ps = con.prepareStatement(SELECT_PLAYERS_ID_BY_AUCTION_ID))
|
try (PreparedStatement ps = con.prepareStatement(SELECT_PLAYERS_ID_BY_AUCTION_ID))
|
||||||
{
|
{
|
||||||
ps.setInt(1, auctionId);
|
ps.setInt(1, auctionId);
|
||||||
|
@ -17,6 +17,7 @@
|
|||||||
package org.l2jmobius.gameserver.network.loginserverpackets.game;
|
package org.l2jmobius.gameserver.network.loginserverpackets.game;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
import org.l2jmobius.commons.network.BaseSendablePacket;
|
import org.l2jmobius.commons.network.BaseSendablePacket;
|
||||||
|
|
||||||
@ -25,7 +26,7 @@ import org.l2jmobius.commons.network.BaseSendablePacket;
|
|||||||
*/
|
*/
|
||||||
public class ServerStatus extends BaseSendablePacket
|
public class ServerStatus extends BaseSendablePacket
|
||||||
{
|
{
|
||||||
private final ArrayList<Attribute> _attributes;
|
private final List<Attribute> _attributes;
|
||||||
|
|
||||||
public static final String[] STATUS_STRING =
|
public static final String[] STATUS_STRING =
|
||||||
{
|
{
|
||||||
|
@ -29,6 +29,7 @@ import java.io.Reader;
|
|||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
import java.nio.charset.StandardCharsets;
|
import java.nio.charset.StandardCharsets;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
@ -304,7 +305,7 @@ public class CronParser
|
|||||||
size = line.length();
|
size = line.length();
|
||||||
|
|
||||||
// Splitting the line
|
// Splitting the line
|
||||||
final ArrayList<String> splitted = new ArrayList<>();
|
final List<String> splitted = new ArrayList<>();
|
||||||
StringBuilder current = null;
|
StringBuilder current = null;
|
||||||
boolean quotes = false;
|
boolean quotes = false;
|
||||||
for (int i = 0; i < size; i++)
|
for (int i = 0; i < size; i++)
|
||||||
@ -376,9 +377,9 @@ public class CronParser
|
|||||||
File stdinFile = null;
|
File stdinFile = null;
|
||||||
File stdoutFile = null;
|
File stdoutFile = null;
|
||||||
File stderrFile = null;
|
File stderrFile = null;
|
||||||
final ArrayList<String> envsList = new ArrayList<>();
|
final List<String> envsList = new ArrayList<>();
|
||||||
String command = null;
|
String command = null;
|
||||||
final ArrayList<String> argsList = new ArrayList<>();
|
final List<String> argsList = new ArrayList<>();
|
||||||
for (int i = 0; i < size; i++)
|
for (int i = 0; i < size; i++)
|
||||||
{
|
{
|
||||||
final String tk = splitted.get(i);
|
final String tk = splitted.get(i);
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
*/
|
*/
|
||||||
package org.l2jmobius.gameserver.util.cron4j;
|
package org.l2jmobius.gameserver.util.cron4j;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
@ -48,7 +48,7 @@ class DayOfMonthValueMatcher extends IntArrayValueMatcher
|
|||||||
* Builds the ValueMatcher.
|
* Builds the ValueMatcher.
|
||||||
* @param values An ArrayList of Integer elements, one for every value accepted by the matcher. The match() method will return true only if its parameter will be one of this list or the last-day-of-month setting applies.
|
* @param values An ArrayList of Integer elements, one for every value accepted by the matcher. The match() method will return true only if its parameter will be one of this list or the last-day-of-month setting applies.
|
||||||
*/
|
*/
|
||||||
public DayOfMonthValueMatcher(ArrayList<?> values)
|
public DayOfMonthValueMatcher(List<?> values)
|
||||||
{
|
{
|
||||||
super(values);
|
super(values);
|
||||||
}
|
}
|
||||||
|
@ -21,6 +21,7 @@ package org.l2jmobius.gameserver.util.cron4j;
|
|||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
@ -34,7 +35,7 @@ class FileTaskCollector implements TaskCollector
|
|||||||
/**
|
/**
|
||||||
* File list.
|
* File list.
|
||||||
*/
|
*/
|
||||||
private final ArrayList<File> files = new ArrayList<>();
|
private final List<File> files = new ArrayList<>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds a file.
|
* Adds a file.
|
||||||
|
@ -19,6 +19,7 @@
|
|||||||
package org.l2jmobius.gameserver.util.cron4j;
|
package org.l2jmobius.gameserver.util.cron4j;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
@ -37,17 +38,17 @@ class MemoryTaskCollector implements TaskCollector
|
|||||||
/**
|
/**
|
||||||
* The inner scheduling pattern list.
|
* The inner scheduling pattern list.
|
||||||
*/
|
*/
|
||||||
private final ArrayList<SchedulingPattern> patterns = new ArrayList<>();
|
private final List<SchedulingPattern> patterns = new ArrayList<>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The inner task list.
|
* The inner task list.
|
||||||
*/
|
*/
|
||||||
private final ArrayList<Task> tasks = new ArrayList<>();
|
private final List<Task> tasks = new ArrayList<>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* IDs for task-pattern couples.
|
* IDs for task-pattern couples.
|
||||||
*/
|
*/
|
||||||
private final ArrayList<String> ids = new ArrayList<>();
|
private final List<String> ids = new ArrayList<>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Counts how many task are currently collected by this collector.
|
* Counts how many task are currently collected by this collector.
|
||||||
|
@ -20,6 +20,7 @@ package org.l2jmobius.gameserver.util.cron4j;
|
|||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
import java.util.TimeZone;
|
import java.util.TimeZone;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -53,7 +54,7 @@ public class Scheduler
|
|||||||
/**
|
/**
|
||||||
* Registered {@link TaskCollector}s list.
|
* Registered {@link TaskCollector}s list.
|
||||||
*/
|
*/
|
||||||
private final ArrayList<TaskCollector> collectors = new ArrayList<>();
|
private final List<TaskCollector> collectors = new ArrayList<>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The {@link MemoryTaskCollector} used for memory stored tasks. Represented here for convenience, it is also the first element in the {@link Scheduler#collectors} list.
|
* The {@link MemoryTaskCollector} used for memory stored tasks. Represented here for convenience, it is also the first element in the {@link Scheduler#collectors} list.
|
||||||
@ -68,7 +69,7 @@ public class Scheduler
|
|||||||
/**
|
/**
|
||||||
* Registered {@link SchedulerListener}s list.
|
* Registered {@link SchedulerListener}s list.
|
||||||
*/
|
*/
|
||||||
private final ArrayList<SchedulerListener> listeners = new ArrayList<>();
|
private final List<SchedulerListener> listeners = new ArrayList<>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The thread checking the clock and requesting the spawning of launcher threads.
|
* The thread checking the clock and requesting the spawning of launcher threads.
|
||||||
@ -78,12 +79,12 @@ public class Scheduler
|
|||||||
/**
|
/**
|
||||||
* Currently running {@link LauncherThread} instances.
|
* Currently running {@link LauncherThread} instances.
|
||||||
*/
|
*/
|
||||||
private ArrayList<LauncherThread> launchers = null;
|
private List<LauncherThread> launchers = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Currently running {@link TaskExecutor} instances.
|
* Currently running {@link TaskExecutor} instances.
|
||||||
*/
|
*/
|
||||||
private ArrayList<TaskExecutor> executors = null;
|
private List<TaskExecutor> executors = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Internal lock, used to synchronize status-aware operations.
|
* Internal lock, used to synchronize status-aware operations.
|
||||||
|
@ -21,6 +21,7 @@ package org.l2jmobius.gameserver.util.cron4j;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
import java.util.GregorianCalendar;
|
import java.util.GregorianCalendar;
|
||||||
|
import java.util.List;
|
||||||
import java.util.StringTokenizer;
|
import java.util.StringTokenizer;
|
||||||
import java.util.TimeZone;
|
import java.util.TimeZone;
|
||||||
|
|
||||||
@ -165,27 +166,27 @@ public class SchedulingPattern
|
|||||||
/**
|
/**
|
||||||
* The ValueMatcher list for the "minute" field.
|
* The ValueMatcher list for the "minute" field.
|
||||||
*/
|
*/
|
||||||
protected ArrayList<ValueMatcher> minuteMatchers = new ArrayList<>();
|
protected List<ValueMatcher> minuteMatchers = new ArrayList<>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The ValueMatcher list for the "hour" field.
|
* The ValueMatcher list for the "hour" field.
|
||||||
*/
|
*/
|
||||||
protected ArrayList<ValueMatcher> hourMatchers = new ArrayList<>();
|
protected List<ValueMatcher> hourMatchers = new ArrayList<>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The ValueMatcher list for the "day of month" field.
|
* The ValueMatcher list for the "day of month" field.
|
||||||
*/
|
*/
|
||||||
protected ArrayList<ValueMatcher> dayOfMonthMatchers = new ArrayList<>();
|
protected List<ValueMatcher> dayOfMonthMatchers = new ArrayList<>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The ValueMatcher list for the "month" field.
|
* The ValueMatcher list for the "month" field.
|
||||||
*/
|
*/
|
||||||
protected ArrayList<ValueMatcher> monthMatchers = new ArrayList<>();
|
protected List<ValueMatcher> monthMatchers = new ArrayList<>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The ValueMatcher list for the "day of week" field.
|
* The ValueMatcher list for the "day of week" field.
|
||||||
*/
|
*/
|
||||||
protected ArrayList<ValueMatcher> dayOfWeekMatchers = new ArrayList<>();
|
protected List<ValueMatcher> dayOfWeekMatchers = new ArrayList<>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* How many matcher groups in this pattern?
|
* How many matcher groups in this pattern?
|
||||||
@ -270,12 +271,12 @@ public class SchedulingPattern
|
|||||||
{
|
{
|
||||||
return new AlwaysTrueValueMatcher();
|
return new AlwaysTrueValueMatcher();
|
||||||
}
|
}
|
||||||
final ArrayList<Object> values = new ArrayList<>();
|
final List<Object> values = new ArrayList<>();
|
||||||
final StringTokenizer st = new StringTokenizer(str, ",");
|
final StringTokenizer st = new StringTokenizer(str, ",");
|
||||||
while (st.hasMoreTokens())
|
while (st.hasMoreTokens())
|
||||||
{
|
{
|
||||||
final String element = st.nextToken();
|
final String element = st.nextToken();
|
||||||
ArrayList<Integer> local;
|
List<Integer> local;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
local = parseListElement(element, parser);
|
local = parseListElement(element, parser);
|
||||||
@ -311,7 +312,7 @@ public class SchedulingPattern
|
|||||||
* @return A list of integers representing the allowed values.
|
* @return A list of integers representing the allowed values.
|
||||||
* @throws Exception If the supplied pattern part is not valid.
|
* @throws Exception If the supplied pattern part is not valid.
|
||||||
*/
|
*/
|
||||||
private ArrayList<Integer> parseListElement(String str, ValueParser parser) throws Exception
|
private List<Integer> parseListElement(String str, ValueParser parser) throws Exception
|
||||||
{
|
{
|
||||||
final StringTokenizer st = new StringTokenizer(str, "/");
|
final StringTokenizer st = new StringTokenizer(str, "/");
|
||||||
final int size = st.countTokens();
|
final int size = st.countTokens();
|
||||||
@ -319,7 +320,7 @@ public class SchedulingPattern
|
|||||||
{
|
{
|
||||||
throw new Exception("syntax error");
|
throw new Exception("syntax error");
|
||||||
}
|
}
|
||||||
ArrayList<Integer> values;
|
List<Integer> values;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
values = parseRange(st.nextToken(), parser);
|
values = parseRange(st.nextToken(), parser);
|
||||||
@ -344,7 +345,7 @@ public class SchedulingPattern
|
|||||||
{
|
{
|
||||||
throw new Exception("non positive divisor \"" + div + "\"");
|
throw new Exception("non positive divisor \"" + div + "\"");
|
||||||
}
|
}
|
||||||
final ArrayList<Integer> values2 = new ArrayList<>();
|
final List<Integer> values2 = new ArrayList<>();
|
||||||
for (int i = 0; i < values.size(); i += div)
|
for (int i = 0; i < values.size(); i += div)
|
||||||
{
|
{
|
||||||
values2.add(values.get(i));
|
values2.add(values.get(i));
|
||||||
@ -361,13 +362,13 @@ public class SchedulingPattern
|
|||||||
* @return A list of integers representing the allowed values.
|
* @return A list of integers representing the allowed values.
|
||||||
* @throws Exception If the supplied pattern part is not valid.
|
* @throws Exception If the supplied pattern part is not valid.
|
||||||
*/
|
*/
|
||||||
private ArrayList<Integer> parseRange(String str, ValueParser parser) throws Exception
|
private List<Integer> parseRange(String str, ValueParser parser) throws Exception
|
||||||
{
|
{
|
||||||
if (str.equals("*"))
|
if (str.equals("*"))
|
||||||
{
|
{
|
||||||
final int min = parser.getMinValue();
|
final int min = parser.getMinValue();
|
||||||
final int max = parser.getMaxValue();
|
final int max = parser.getMaxValue();
|
||||||
final ArrayList<Integer> values = new ArrayList<>();
|
final List<Integer> values = new ArrayList<>();
|
||||||
for (int i = min; i <= max; i++)
|
for (int i = min; i <= max; i++)
|
||||||
{
|
{
|
||||||
values.add(i);
|
values.add(i);
|
||||||
@ -392,7 +393,7 @@ public class SchedulingPattern
|
|||||||
}
|
}
|
||||||
if (size == 1)
|
if (size == 1)
|
||||||
{
|
{
|
||||||
final ArrayList<Integer> values = new ArrayList<>();
|
final List<Integer> values = new ArrayList<>();
|
||||||
values.add(v1);
|
values.add(v1);
|
||||||
return values;
|
return values;
|
||||||
}
|
}
|
||||||
@ -406,7 +407,7 @@ public class SchedulingPattern
|
|||||||
{
|
{
|
||||||
throw new Exception("invalid value \"" + v2Str + "\", " + e.getMessage());
|
throw new Exception("invalid value \"" + v2Str + "\", " + e.getMessage());
|
||||||
}
|
}
|
||||||
final ArrayList<Integer> values = new ArrayList<>();
|
final List<Integer> values = new ArrayList<>();
|
||||||
if (v1 < v2)
|
if (v1 < v2)
|
||||||
{
|
{
|
||||||
for (int i = v1; i <= v2; i++)
|
for (int i = v1; i <= v2; i++)
|
||||||
|
@ -22,6 +22,7 @@ import java.io.IOException;
|
|||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.io.OutputStream;
|
import java.io.OutputStream;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
@ -35,7 +36,7 @@ class StreamBridge
|
|||||||
/**
|
/**
|
||||||
* Used to trace alive instances.
|
* Used to trace alive instances.
|
||||||
*/
|
*/
|
||||||
static ArrayList<StreamBridge> traced = new ArrayList<>();
|
static List<StreamBridge> traced = new ArrayList<>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A self-referece, for inner classes.
|
* A self-referece, for inner classes.
|
||||||
|
@ -19,6 +19,7 @@
|
|||||||
package org.l2jmobius.gameserver.util.cron4j;
|
package org.l2jmobius.gameserver.util.cron4j;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
@ -64,7 +65,7 @@ public class TaskExecutor
|
|||||||
/**
|
/**
|
||||||
* A list of {@link TaskExecutorListener} instances.
|
* A list of {@link TaskExecutorListener} instances.
|
||||||
*/
|
*/
|
||||||
private final ArrayList<TaskExecutorListener> listeners = new ArrayList<>();
|
private final List<TaskExecutorListener> listeners = new ArrayList<>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A time stamp reporting the start time of this thread.
|
* A time stamp reporting the start time of this thread.
|
||||||
|
@ -19,6 +19,7 @@
|
|||||||
package org.l2jmobius.gameserver.util.cron4j;
|
package org.l2jmobius.gameserver.util.cron4j;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
@ -37,12 +38,12 @@ public class TaskTable
|
|||||||
/**
|
/**
|
||||||
* Pattern list.
|
* Pattern list.
|
||||||
*/
|
*/
|
||||||
private final ArrayList<SchedulingPattern> patterns = new ArrayList<>();
|
private final List<SchedulingPattern> patterns = new ArrayList<>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Task list.
|
* Task list.
|
||||||
*/
|
*/
|
||||||
private final ArrayList<Task> tasks = new ArrayList<>();
|
private final List<Task> tasks = new ArrayList<>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds a task and an associated scheduling pattern to the table.
|
* Adds a task and an associated scheduling pattern to the table.
|
||||||
|
@ -17,6 +17,7 @@
|
|||||||
package ai.areas.AteliaFortress.AteliaManager;
|
package ai.areas.AteliaFortress.AteliaManager;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
import org.l2jmobius.commons.util.CommonUtil;
|
import org.l2jmobius.commons.util.CommonUtil;
|
||||||
import org.l2jmobius.gameserver.datatables.SpawnTable;
|
import org.l2jmobius.gameserver.datatables.SpawnTable;
|
||||||
@ -308,7 +309,7 @@ public class AteliaManager extends AbstractNpcAI
|
|||||||
private static final int SBCANCEL = 3600000; // Time 1 Hour
|
private static final int SBCANCEL = 3600000; // Time 1 Hour
|
||||||
private static final int DDESPAWN = 10800000; // Time 3 Hour
|
private static final int DDESPAWN = 10800000; // Time 3 Hour
|
||||||
|
|
||||||
static ArrayList<Npc> FortessSpawns = new ArrayList<>();
|
static List<Npc> FortessSpawns = new ArrayList<>();
|
||||||
|
|
||||||
private AteliaManager()
|
private AteliaManager()
|
||||||
{
|
{
|
||||||
|
@ -21,6 +21,7 @@ import static org.l2jmobius.gameserver.ai.CtrlIntention.AI_INTENTION_FOLLOW;
|
|||||||
import static org.l2jmobius.gameserver.ai.CtrlIntention.AI_INTENTION_IDLE;
|
import static org.l2jmobius.gameserver.ai.CtrlIntention.AI_INTENTION_IDLE;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
import org.l2jmobius.gameserver.data.xml.impl.SkillData;
|
import org.l2jmobius.gameserver.data.xml.impl.SkillData;
|
||||||
import org.l2jmobius.gameserver.geoengine.GeoEngine;
|
import org.l2jmobius.gameserver.geoengine.GeoEngine;
|
||||||
@ -210,7 +211,7 @@ public class ScarletVanHalisha extends AbstractNpcAI
|
|||||||
|
|
||||||
private Creature getRandomTarget(Npc npc, Skill skill)
|
private Creature getRandomTarget(Npc npc, Skill skill)
|
||||||
{
|
{
|
||||||
final ArrayList<Creature> result = new ArrayList<>();
|
final List<Creature> result = new ArrayList<>();
|
||||||
{
|
{
|
||||||
for (PlayerInstance obj : npc.getInstanceWorld().getPlayers())
|
for (PlayerInstance obj : npc.getInstanceWorld().getPlayers())
|
||||||
{
|
{
|
||||||
|
@ -106,7 +106,7 @@ public class Kelbim extends AbstractNpcAI
|
|||||||
private static GrandBossInstance _kelbimBoss;
|
private static GrandBossInstance _kelbimBoss;
|
||||||
private static long _lastAction;
|
private static long _lastAction;
|
||||||
private static int _bossStage;
|
private static int _bossStage;
|
||||||
private static ArrayList<Npc> _minions = new ArrayList<>();
|
private static List<Npc> _minions = new ArrayList<>();
|
||||||
|
|
||||||
public Kelbim()
|
public Kelbim()
|
||||||
{
|
{
|
||||||
|
@ -17,6 +17,7 @@
|
|||||||
package org.l2jmobius.gameserver.model.clientstrings;
|
package org.l2jmobius.gameserver.model.clientstrings;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Forsaiken, Zoey76
|
* @author Forsaiken, Zoey76
|
||||||
@ -31,7 +32,7 @@ public abstract class Builder
|
|||||||
|
|
||||||
public static Builder newBuilder(String text)
|
public static Builder newBuilder(String text)
|
||||||
{
|
{
|
||||||
final ArrayList<Builder> builders = new ArrayList<>();
|
final List<Builder> builders = new ArrayList<>();
|
||||||
|
|
||||||
int index1 = 0;
|
int index1 = 0;
|
||||||
int index2 = 0;
|
int index2 = 0;
|
||||||
|
@ -27,6 +27,7 @@ import java.util.Collection;
|
|||||||
import java.util.Comparator;
|
import java.util.Comparator;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.concurrent.ScheduledFuture;
|
import java.util.concurrent.ScheduledFuture;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
@ -69,7 +70,7 @@ public class ItemAuctionInstance
|
|||||||
private final int _instanceId;
|
private final int _instanceId;
|
||||||
private final AtomicInteger _auctionIds;
|
private final AtomicInteger _auctionIds;
|
||||||
private final Map<Integer, ItemAuction> _auctions;
|
private final Map<Integer, ItemAuction> _auctions;
|
||||||
private final ArrayList<AuctionItem> _items;
|
private final List<AuctionItem> _items;
|
||||||
private final AuctionDateGenerator _dateGenerator;
|
private final AuctionDateGenerator _dateGenerator;
|
||||||
|
|
||||||
private ItemAuction _currentAuction;
|
private ItemAuction _currentAuction;
|
||||||
@ -593,7 +594,7 @@ public class ItemAuctionInstance
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
final ArrayList<ItemAuctionBid> auctionBids = new ArrayList<>();
|
final List<ItemAuctionBid> auctionBids = new ArrayList<>();
|
||||||
try (PreparedStatement ps = con.prepareStatement(SELECT_PLAYERS_ID_BY_AUCTION_ID))
|
try (PreparedStatement ps = con.prepareStatement(SELECT_PLAYERS_ID_BY_AUCTION_ID))
|
||||||
{
|
{
|
||||||
ps.setInt(1, auctionId);
|
ps.setInt(1, auctionId);
|
||||||
|
@ -17,6 +17,7 @@
|
|||||||
package org.l2jmobius.gameserver.network.loginserverpackets.game;
|
package org.l2jmobius.gameserver.network.loginserverpackets.game;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
import org.l2jmobius.commons.network.BaseSendablePacket;
|
import org.l2jmobius.commons.network.BaseSendablePacket;
|
||||||
|
|
||||||
@ -25,7 +26,7 @@ import org.l2jmobius.commons.network.BaseSendablePacket;
|
|||||||
*/
|
*/
|
||||||
public class ServerStatus extends BaseSendablePacket
|
public class ServerStatus extends BaseSendablePacket
|
||||||
{
|
{
|
||||||
private final ArrayList<Attribute> _attributes;
|
private final List<Attribute> _attributes;
|
||||||
|
|
||||||
public static final String[] STATUS_STRING =
|
public static final String[] STATUS_STRING =
|
||||||
{
|
{
|
||||||
|
@ -29,6 +29,7 @@ import java.io.Reader;
|
|||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
import java.nio.charset.StandardCharsets;
|
import java.nio.charset.StandardCharsets;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
@ -304,7 +305,7 @@ public class CronParser
|
|||||||
size = line.length();
|
size = line.length();
|
||||||
|
|
||||||
// Splitting the line
|
// Splitting the line
|
||||||
final ArrayList<String> splitted = new ArrayList<>();
|
final List<String> splitted = new ArrayList<>();
|
||||||
StringBuilder current = null;
|
StringBuilder current = null;
|
||||||
boolean quotes = false;
|
boolean quotes = false;
|
||||||
for (int i = 0; i < size; i++)
|
for (int i = 0; i < size; i++)
|
||||||
@ -376,9 +377,9 @@ public class CronParser
|
|||||||
File stdinFile = null;
|
File stdinFile = null;
|
||||||
File stdoutFile = null;
|
File stdoutFile = null;
|
||||||
File stderrFile = null;
|
File stderrFile = null;
|
||||||
final ArrayList<String> envsList = new ArrayList<>();
|
final List<String> envsList = new ArrayList<>();
|
||||||
String command = null;
|
String command = null;
|
||||||
final ArrayList<String> argsList = new ArrayList<>();
|
final List<String> argsList = new ArrayList<>();
|
||||||
for (int i = 0; i < size; i++)
|
for (int i = 0; i < size; i++)
|
||||||
{
|
{
|
||||||
final String tk = splitted.get(i);
|
final String tk = splitted.get(i);
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
*/
|
*/
|
||||||
package org.l2jmobius.gameserver.util.cron4j;
|
package org.l2jmobius.gameserver.util.cron4j;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
@ -48,7 +48,7 @@ class DayOfMonthValueMatcher extends IntArrayValueMatcher
|
|||||||
* Builds the ValueMatcher.
|
* Builds the ValueMatcher.
|
||||||
* @param values An ArrayList of Integer elements, one for every value accepted by the matcher. The match() method will return true only if its parameter will be one of this list or the last-day-of-month setting applies.
|
* @param values An ArrayList of Integer elements, one for every value accepted by the matcher. The match() method will return true only if its parameter will be one of this list or the last-day-of-month setting applies.
|
||||||
*/
|
*/
|
||||||
public DayOfMonthValueMatcher(ArrayList<?> values)
|
public DayOfMonthValueMatcher(List<?> values)
|
||||||
{
|
{
|
||||||
super(values);
|
super(values);
|
||||||
}
|
}
|
||||||
|
@ -21,6 +21,7 @@ package org.l2jmobius.gameserver.util.cron4j;
|
|||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
@ -34,7 +35,7 @@ class FileTaskCollector implements TaskCollector
|
|||||||
/**
|
/**
|
||||||
* File list.
|
* File list.
|
||||||
*/
|
*/
|
||||||
private final ArrayList<File> files = new ArrayList<>();
|
private final List<File> files = new ArrayList<>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds a file.
|
* Adds a file.
|
||||||
|
@ -19,6 +19,7 @@
|
|||||||
package org.l2jmobius.gameserver.util.cron4j;
|
package org.l2jmobius.gameserver.util.cron4j;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
@ -37,17 +38,17 @@ class MemoryTaskCollector implements TaskCollector
|
|||||||
/**
|
/**
|
||||||
* The inner scheduling pattern list.
|
* The inner scheduling pattern list.
|
||||||
*/
|
*/
|
||||||
private final ArrayList<SchedulingPattern> patterns = new ArrayList<>();
|
private final List<SchedulingPattern> patterns = new ArrayList<>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The inner task list.
|
* The inner task list.
|
||||||
*/
|
*/
|
||||||
private final ArrayList<Task> tasks = new ArrayList<>();
|
private final List<Task> tasks = new ArrayList<>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* IDs for task-pattern couples.
|
* IDs for task-pattern couples.
|
||||||
*/
|
*/
|
||||||
private final ArrayList<String> ids = new ArrayList<>();
|
private final List<String> ids = new ArrayList<>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Counts how many task are currently collected by this collector.
|
* Counts how many task are currently collected by this collector.
|
||||||
|
@ -20,6 +20,7 @@ package org.l2jmobius.gameserver.util.cron4j;
|
|||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
import java.util.TimeZone;
|
import java.util.TimeZone;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -53,7 +54,7 @@ public class Scheduler
|
|||||||
/**
|
/**
|
||||||
* Registered {@link TaskCollector}s list.
|
* Registered {@link TaskCollector}s list.
|
||||||
*/
|
*/
|
||||||
private final ArrayList<TaskCollector> collectors = new ArrayList<>();
|
private final List<TaskCollector> collectors = new ArrayList<>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The {@link MemoryTaskCollector} used for memory stored tasks. Represented here for convenience, it is also the first element in the {@link Scheduler#collectors} list.
|
* The {@link MemoryTaskCollector} used for memory stored tasks. Represented here for convenience, it is also the first element in the {@link Scheduler#collectors} list.
|
||||||
@ -68,7 +69,7 @@ public class Scheduler
|
|||||||
/**
|
/**
|
||||||
* Registered {@link SchedulerListener}s list.
|
* Registered {@link SchedulerListener}s list.
|
||||||
*/
|
*/
|
||||||
private final ArrayList<SchedulerListener> listeners = new ArrayList<>();
|
private final List<SchedulerListener> listeners = new ArrayList<>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The thread checking the clock and requesting the spawning of launcher threads.
|
* The thread checking the clock and requesting the spawning of launcher threads.
|
||||||
@ -78,12 +79,12 @@ public class Scheduler
|
|||||||
/**
|
/**
|
||||||
* Currently running {@link LauncherThread} instances.
|
* Currently running {@link LauncherThread} instances.
|
||||||
*/
|
*/
|
||||||
private ArrayList<LauncherThread> launchers = null;
|
private List<LauncherThread> launchers = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Currently running {@link TaskExecutor} instances.
|
* Currently running {@link TaskExecutor} instances.
|
||||||
*/
|
*/
|
||||||
private ArrayList<TaskExecutor> executors = null;
|
private List<TaskExecutor> executors = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Internal lock, used to synchronize status-aware operations.
|
* Internal lock, used to synchronize status-aware operations.
|
||||||
|
@ -21,6 +21,7 @@ package org.l2jmobius.gameserver.util.cron4j;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
import java.util.GregorianCalendar;
|
import java.util.GregorianCalendar;
|
||||||
|
import java.util.List;
|
||||||
import java.util.StringTokenizer;
|
import java.util.StringTokenizer;
|
||||||
import java.util.TimeZone;
|
import java.util.TimeZone;
|
||||||
|
|
||||||
@ -165,27 +166,27 @@ public class SchedulingPattern
|
|||||||
/**
|
/**
|
||||||
* The ValueMatcher list for the "minute" field.
|
* The ValueMatcher list for the "minute" field.
|
||||||
*/
|
*/
|
||||||
protected ArrayList<ValueMatcher> minuteMatchers = new ArrayList<>();
|
protected List<ValueMatcher> minuteMatchers = new ArrayList<>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The ValueMatcher list for the "hour" field.
|
* The ValueMatcher list for the "hour" field.
|
||||||
*/
|
*/
|
||||||
protected ArrayList<ValueMatcher> hourMatchers = new ArrayList<>();
|
protected List<ValueMatcher> hourMatchers = new ArrayList<>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The ValueMatcher list for the "day of month" field.
|
* The ValueMatcher list for the "day of month" field.
|
||||||
*/
|
*/
|
||||||
protected ArrayList<ValueMatcher> dayOfMonthMatchers = new ArrayList<>();
|
protected List<ValueMatcher> dayOfMonthMatchers = new ArrayList<>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The ValueMatcher list for the "month" field.
|
* The ValueMatcher list for the "month" field.
|
||||||
*/
|
*/
|
||||||
protected ArrayList<ValueMatcher> monthMatchers = new ArrayList<>();
|
protected List<ValueMatcher> monthMatchers = new ArrayList<>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The ValueMatcher list for the "day of week" field.
|
* The ValueMatcher list for the "day of week" field.
|
||||||
*/
|
*/
|
||||||
protected ArrayList<ValueMatcher> dayOfWeekMatchers = new ArrayList<>();
|
protected List<ValueMatcher> dayOfWeekMatchers = new ArrayList<>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* How many matcher groups in this pattern?
|
* How many matcher groups in this pattern?
|
||||||
@ -270,12 +271,12 @@ public class SchedulingPattern
|
|||||||
{
|
{
|
||||||
return new AlwaysTrueValueMatcher();
|
return new AlwaysTrueValueMatcher();
|
||||||
}
|
}
|
||||||
final ArrayList<Object> values = new ArrayList<>();
|
final List<Object> values = new ArrayList<>();
|
||||||
final StringTokenizer st = new StringTokenizer(str, ",");
|
final StringTokenizer st = new StringTokenizer(str, ",");
|
||||||
while (st.hasMoreTokens())
|
while (st.hasMoreTokens())
|
||||||
{
|
{
|
||||||
final String element = st.nextToken();
|
final String element = st.nextToken();
|
||||||
ArrayList<Integer> local;
|
List<Integer> local;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
local = parseListElement(element, parser);
|
local = parseListElement(element, parser);
|
||||||
@ -311,7 +312,7 @@ public class SchedulingPattern
|
|||||||
* @return A list of integers representing the allowed values.
|
* @return A list of integers representing the allowed values.
|
||||||
* @throws Exception If the supplied pattern part is not valid.
|
* @throws Exception If the supplied pattern part is not valid.
|
||||||
*/
|
*/
|
||||||
private ArrayList<Integer> parseListElement(String str, ValueParser parser) throws Exception
|
private List<Integer> parseListElement(String str, ValueParser parser) throws Exception
|
||||||
{
|
{
|
||||||
final StringTokenizer st = new StringTokenizer(str, "/");
|
final StringTokenizer st = new StringTokenizer(str, "/");
|
||||||
final int size = st.countTokens();
|
final int size = st.countTokens();
|
||||||
@ -319,7 +320,7 @@ public class SchedulingPattern
|
|||||||
{
|
{
|
||||||
throw new Exception("syntax error");
|
throw new Exception("syntax error");
|
||||||
}
|
}
|
||||||
ArrayList<Integer> values;
|
List<Integer> values;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
values = parseRange(st.nextToken(), parser);
|
values = parseRange(st.nextToken(), parser);
|
||||||
@ -344,7 +345,7 @@ public class SchedulingPattern
|
|||||||
{
|
{
|
||||||
throw new Exception("non positive divisor \"" + div + "\"");
|
throw new Exception("non positive divisor \"" + div + "\"");
|
||||||
}
|
}
|
||||||
final ArrayList<Integer> values2 = new ArrayList<>();
|
final List<Integer> values2 = new ArrayList<>();
|
||||||
for (int i = 0; i < values.size(); i += div)
|
for (int i = 0; i < values.size(); i += div)
|
||||||
{
|
{
|
||||||
values2.add(values.get(i));
|
values2.add(values.get(i));
|
||||||
@ -361,13 +362,13 @@ public class SchedulingPattern
|
|||||||
* @return A list of integers representing the allowed values.
|
* @return A list of integers representing the allowed values.
|
||||||
* @throws Exception If the supplied pattern part is not valid.
|
* @throws Exception If the supplied pattern part is not valid.
|
||||||
*/
|
*/
|
||||||
private ArrayList<Integer> parseRange(String str, ValueParser parser) throws Exception
|
private List<Integer> parseRange(String str, ValueParser parser) throws Exception
|
||||||
{
|
{
|
||||||
if (str.equals("*"))
|
if (str.equals("*"))
|
||||||
{
|
{
|
||||||
final int min = parser.getMinValue();
|
final int min = parser.getMinValue();
|
||||||
final int max = parser.getMaxValue();
|
final int max = parser.getMaxValue();
|
||||||
final ArrayList<Integer> values = new ArrayList<>();
|
final List<Integer> values = new ArrayList<>();
|
||||||
for (int i = min; i <= max; i++)
|
for (int i = min; i <= max; i++)
|
||||||
{
|
{
|
||||||
values.add(i);
|
values.add(i);
|
||||||
@ -392,7 +393,7 @@ public class SchedulingPattern
|
|||||||
}
|
}
|
||||||
if (size == 1)
|
if (size == 1)
|
||||||
{
|
{
|
||||||
final ArrayList<Integer> values = new ArrayList<>();
|
final List<Integer> values = new ArrayList<>();
|
||||||
values.add(v1);
|
values.add(v1);
|
||||||
return values;
|
return values;
|
||||||
}
|
}
|
||||||
@ -406,7 +407,7 @@ public class SchedulingPattern
|
|||||||
{
|
{
|
||||||
throw new Exception("invalid value \"" + v2Str + "\", " + e.getMessage());
|
throw new Exception("invalid value \"" + v2Str + "\", " + e.getMessage());
|
||||||
}
|
}
|
||||||
final ArrayList<Integer> values = new ArrayList<>();
|
final List<Integer> values = new ArrayList<>();
|
||||||
if (v1 < v2)
|
if (v1 < v2)
|
||||||
{
|
{
|
||||||
for (int i = v1; i <= v2; i++)
|
for (int i = v1; i <= v2; i++)
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user