Removed stream usage from ClanHallData.

This commit is contained in:
MobiusDevelopment
2023-01-08 13:58:15 +00:00
parent e249bd3aea
commit e7193f5f11
26 changed files with 286 additions and 52 deletions

View File

@@ -19,12 +19,12 @@ package org.l2jmobius.gameserver.data.xml;
import java.io.File;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.logging.Logger;
import java.util.stream.Collectors;
import org.w3c.dom.Document;
import org.w3c.dom.NamedNodeMap;
@@ -212,7 +212,16 @@ public class ClanHallData implements IXmlReader
public List<ClanHall> getFreeAuctionableHall()
{
return _clanHalls.values().stream().filter(ch -> (ch.getType() == ClanHallType.AUCTIONABLE) && (ch.getOwner() == null)).sorted(Comparator.comparingInt(ClanHall::getResidenceId)).collect(Collectors.toList());
final List<ClanHall> freeAuctionableHalls = new ArrayList<>();
for (ClanHall ch : _clanHalls.values())
{
if ((ch.getType() == ClanHallType.AUCTIONABLE) && (ch.getOwner() == null))
{
freeAuctionableHalls.add(ch);
}
}
Collections.sort(freeAuctionableHalls, Comparator.comparingInt(ClanHall::getResidenceId));
return freeAuctionableHalls;
}
/**

View File

@@ -19,12 +19,12 @@ package org.l2jmobius.gameserver.data.xml;
import java.io.File;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.logging.Logger;
import java.util.stream.Collectors;
import org.w3c.dom.Document;
import org.w3c.dom.NamedNodeMap;
@@ -212,7 +212,16 @@ public class ClanHallData implements IXmlReader
public List<ClanHall> getFreeAuctionableHall()
{
return _clanHalls.values().stream().filter(ch -> (ch.getType() == ClanHallType.AUCTIONABLE) && (ch.getOwner() == null)).sorted(Comparator.comparingInt(ClanHall::getResidenceId)).collect(Collectors.toList());
final List<ClanHall> freeAuctionableHalls = new ArrayList<>();
for (ClanHall ch : _clanHalls.values())
{
if ((ch.getType() == ClanHallType.AUCTIONABLE) && (ch.getOwner() == null))
{
freeAuctionableHalls.add(ch);
}
}
Collections.sort(freeAuctionableHalls, Comparator.comparingInt(ClanHall::getResidenceId));
return freeAuctionableHalls;
}
/**

View File

@@ -19,12 +19,12 @@ package org.l2jmobius.gameserver.data.xml;
import java.io.File;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.logging.Logger;
import java.util.stream.Collectors;
import org.w3c.dom.Document;
import org.w3c.dom.NamedNodeMap;
@@ -212,7 +212,16 @@ public class ClanHallData implements IXmlReader
public List<ClanHall> getFreeAuctionableHall()
{
return _clanHalls.values().stream().filter(ch -> (ch.getType() == ClanHallType.AUCTIONABLE) && (ch.getOwner() == null)).sorted(Comparator.comparingInt(ClanHall::getResidenceId)).collect(Collectors.toList());
final List<ClanHall> freeAuctionableHalls = new ArrayList<>();
for (ClanHall ch : _clanHalls.values())
{
if ((ch.getType() == ClanHallType.AUCTIONABLE) && (ch.getOwner() == null))
{
freeAuctionableHalls.add(ch);
}
}
Collections.sort(freeAuctionableHalls, Comparator.comparingInt(ClanHall::getResidenceId));
return freeAuctionableHalls;
}
/**

View File

@@ -19,12 +19,12 @@ package org.l2jmobius.gameserver.data.xml;
import java.io.File;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.logging.Logger;
import java.util.stream.Collectors;
import org.w3c.dom.Document;
import org.w3c.dom.NamedNodeMap;
@@ -212,7 +212,16 @@ public class ClanHallData implements IXmlReader
public List<ClanHall> getFreeAuctionableHall()
{
return _clanHalls.values().stream().filter(ch -> (ch.getType() == ClanHallType.AUCTIONABLE) && (ch.getOwner() == null)).sorted(Comparator.comparingInt(ClanHall::getResidenceId)).collect(Collectors.toList());
final List<ClanHall> freeAuctionableHalls = new ArrayList<>();
for (ClanHall ch : _clanHalls.values())
{
if ((ch.getType() == ClanHallType.AUCTIONABLE) && (ch.getOwner() == null))
{
freeAuctionableHalls.add(ch);
}
}
Collections.sort(freeAuctionableHalls, Comparator.comparingInt(ClanHall::getResidenceId));
return freeAuctionableHalls;
}
/**

View File

@@ -19,12 +19,12 @@ package org.l2jmobius.gameserver.data.xml;
import java.io.File;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.logging.Logger;
import java.util.stream.Collectors;
import org.w3c.dom.Document;
import org.w3c.dom.NamedNodeMap;
@@ -212,7 +212,16 @@ public class ClanHallData implements IXmlReader
public List<ClanHall> getFreeAuctionableHall()
{
return _clanHalls.values().stream().filter(ch -> (ch.getType() == ClanHallType.AUCTIONABLE) && (ch.getOwner() == null)).sorted(Comparator.comparingInt(ClanHall::getResidenceId)).collect(Collectors.toList());
final List<ClanHall> freeAuctionableHalls = new ArrayList<>();
for (ClanHall ch : _clanHalls.values())
{
if ((ch.getType() == ClanHallType.AUCTIONABLE) && (ch.getOwner() == null))
{
freeAuctionableHalls.add(ch);
}
}
Collections.sort(freeAuctionableHalls, Comparator.comparingInt(ClanHall::getResidenceId));
return freeAuctionableHalls;
}
/**

View File

@@ -19,12 +19,12 @@ package org.l2jmobius.gameserver.data.xml;
import java.io.File;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.logging.Logger;
import java.util.stream.Collectors;
import org.w3c.dom.Document;
import org.w3c.dom.NamedNodeMap;
@@ -212,7 +212,16 @@ public class ClanHallData implements IXmlReader
public List<ClanHall> getFreeAuctionableHall()
{
return _clanHalls.values().stream().filter(ch -> (ch.getType() == ClanHallType.AUCTIONABLE) && (ch.getOwner() == null)).sorted(Comparator.comparingInt(ClanHall::getResidenceId)).collect(Collectors.toList());
final List<ClanHall> freeAuctionableHalls = new ArrayList<>();
for (ClanHall ch : _clanHalls.values())
{
if ((ch.getType() == ClanHallType.AUCTIONABLE) && (ch.getOwner() == null))
{
freeAuctionableHalls.add(ch);
}
}
Collections.sort(freeAuctionableHalls, Comparator.comparingInt(ClanHall::getResidenceId));
return freeAuctionableHalls;
}
/**

View File

@@ -19,12 +19,12 @@ package org.l2jmobius.gameserver.data.xml;
import java.io.File;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.logging.Logger;
import java.util.stream.Collectors;
import org.w3c.dom.Document;
import org.w3c.dom.NamedNodeMap;
@@ -212,7 +212,16 @@ public class ClanHallData implements IXmlReader
public List<ClanHall> getFreeAuctionableHall()
{
return _clanHalls.values().stream().filter(ch -> (ch.getType() == ClanHallType.AUCTIONABLE) && (ch.getOwner() == null)).sorted(Comparator.comparingInt(ClanHall::getResidenceId)).collect(Collectors.toList());
final List<ClanHall> freeAuctionableHalls = new ArrayList<>();
for (ClanHall ch : _clanHalls.values())
{
if ((ch.getType() == ClanHallType.AUCTIONABLE) && (ch.getOwner() == null))
{
freeAuctionableHalls.add(ch);
}
}
Collections.sort(freeAuctionableHalls, Comparator.comparingInt(ClanHall::getResidenceId));
return freeAuctionableHalls;
}
/**

View File

@@ -19,12 +19,12 @@ package org.l2jmobius.gameserver.data.xml;
import java.io.File;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.logging.Logger;
import java.util.stream.Collectors;
import org.w3c.dom.Document;
import org.w3c.dom.NamedNodeMap;
@@ -212,7 +212,16 @@ public class ClanHallData implements IXmlReader
public List<ClanHall> getFreeAuctionableHall()
{
return _clanHalls.values().stream().filter(ch -> (ch.getType() == ClanHallType.AUCTIONABLE) && (ch.getOwner() == null)).sorted(Comparator.comparingInt(ClanHall::getResidenceId)).collect(Collectors.toList());
final List<ClanHall> freeAuctionableHalls = new ArrayList<>();
for (ClanHall ch : _clanHalls.values())
{
if ((ch.getType() == ClanHallType.AUCTIONABLE) && (ch.getOwner() == null))
{
freeAuctionableHalls.add(ch);
}
}
Collections.sort(freeAuctionableHalls, Comparator.comparingInt(ClanHall::getResidenceId));
return freeAuctionableHalls;
}
/**

View File

@@ -19,12 +19,12 @@ package org.l2jmobius.gameserver.data.xml;
import java.io.File;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.logging.Logger;
import java.util.stream.Collectors;
import org.w3c.dom.Document;
import org.w3c.dom.NamedNodeMap;
@@ -212,7 +212,16 @@ public class ClanHallData implements IXmlReader
public List<ClanHall> getFreeAuctionableHall()
{
return _clanHalls.values().stream().filter(ch -> (ch.getType() == ClanHallType.AUCTIONABLE) && (ch.getOwner() == null)).sorted(Comparator.comparingInt(ClanHall::getResidenceId)).collect(Collectors.toList());
final List<ClanHall> freeAuctionableHalls = new ArrayList<>();
for (ClanHall ch : _clanHalls.values())
{
if ((ch.getType() == ClanHallType.AUCTIONABLE) && (ch.getOwner() == null))
{
freeAuctionableHalls.add(ch);
}
}
Collections.sort(freeAuctionableHalls, Comparator.comparingInt(ClanHall::getResidenceId));
return freeAuctionableHalls;
}
/**

View File

@@ -19,12 +19,12 @@ package org.l2jmobius.gameserver.data.xml;
import java.io.File;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.logging.Logger;
import java.util.stream.Collectors;
import org.w3c.dom.Document;
import org.w3c.dom.NamedNodeMap;
@@ -212,7 +212,16 @@ public class ClanHallData implements IXmlReader
public List<ClanHall> getFreeAuctionableHall()
{
return _clanHalls.values().stream().filter(ch -> (ch.getType() == ClanHallType.AUCTIONABLE) && (ch.getOwner() == null)).sorted(Comparator.comparingInt(ClanHall::getResidenceId)).collect(Collectors.toList());
final List<ClanHall> freeAuctionableHalls = new ArrayList<>();
for (ClanHall ch : _clanHalls.values())
{
if ((ch.getType() == ClanHallType.AUCTIONABLE) && (ch.getOwner() == null))
{
freeAuctionableHalls.add(ch);
}
}
Collections.sort(freeAuctionableHalls, Comparator.comparingInt(ClanHall::getResidenceId));
return freeAuctionableHalls;
}
/**

View File

@@ -19,12 +19,12 @@ package org.l2jmobius.gameserver.data.xml;
import java.io.File;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.logging.Logger;
import java.util.stream.Collectors;
import org.w3c.dom.Document;
import org.w3c.dom.NamedNodeMap;
@@ -212,7 +212,16 @@ public class ClanHallData implements IXmlReader
public List<ClanHall> getFreeAuctionableHall()
{
return _clanHalls.values().stream().filter(ch -> (ch.getType() == ClanHallType.AUCTIONABLE) && (ch.getOwner() == null)).sorted(Comparator.comparingInt(ClanHall::getResidenceId)).collect(Collectors.toList());
final List<ClanHall> freeAuctionableHalls = new ArrayList<>();
for (ClanHall ch : _clanHalls.values())
{
if ((ch.getType() == ClanHallType.AUCTIONABLE) && (ch.getOwner() == null))
{
freeAuctionableHalls.add(ch);
}
}
Collections.sort(freeAuctionableHalls, Comparator.comparingInt(ClanHall::getResidenceId));
return freeAuctionableHalls;
}
/**

View File

@@ -19,12 +19,12 @@ package org.l2jmobius.gameserver.data.xml;
import java.io.File;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.logging.Logger;
import java.util.stream.Collectors;
import org.w3c.dom.Document;
import org.w3c.dom.NamedNodeMap;
@@ -212,7 +212,16 @@ public class ClanHallData implements IXmlReader
public List<ClanHall> getFreeAuctionableHall()
{
return _clanHalls.values().stream().filter(ch -> (ch.getType() == ClanHallType.AUCTIONABLE) && (ch.getOwner() == null)).sorted(Comparator.comparingInt(ClanHall::getResidenceId)).collect(Collectors.toList());
final List<ClanHall> freeAuctionableHalls = new ArrayList<>();
for (ClanHall ch : _clanHalls.values())
{
if ((ch.getType() == ClanHallType.AUCTIONABLE) && (ch.getOwner() == null))
{
freeAuctionableHalls.add(ch);
}
}
Collections.sort(freeAuctionableHalls, Comparator.comparingInt(ClanHall::getResidenceId));
return freeAuctionableHalls;
}
/**

View File

@@ -19,12 +19,12 @@ package org.l2jmobius.gameserver.data.xml;
import java.io.File;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.logging.Logger;
import java.util.stream.Collectors;
import org.w3c.dom.Document;
import org.w3c.dom.NamedNodeMap;
@@ -212,7 +212,16 @@ public class ClanHallData implements IXmlReader
public List<ClanHall> getFreeAuctionableHall()
{
return _clanHalls.values().stream().filter(ch -> (ch.getType() == ClanHallType.AUCTIONABLE) && (ch.getOwner() == null)).sorted(Comparator.comparingInt(ClanHall::getResidenceId)).collect(Collectors.toList());
final List<ClanHall> freeAuctionableHalls = new ArrayList<>();
for (ClanHall ch : _clanHalls.values())
{
if ((ch.getType() == ClanHallType.AUCTIONABLE) && (ch.getOwner() == null))
{
freeAuctionableHalls.add(ch);
}
}
Collections.sort(freeAuctionableHalls, Comparator.comparingInt(ClanHall::getResidenceId));
return freeAuctionableHalls;
}
/**

View File

@@ -19,12 +19,12 @@ package org.l2jmobius.gameserver.data.xml;
import java.io.File;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.logging.Logger;
import java.util.stream.Collectors;
import org.w3c.dom.Document;
import org.w3c.dom.NamedNodeMap;
@@ -212,7 +212,16 @@ public class ClanHallData implements IXmlReader
public List<ClanHall> getFreeAuctionableHall()
{
return _clanHalls.values().stream().filter(ch -> (ch.getType() == ClanHallType.AUCTIONABLE) && (ch.getOwner() == null)).sorted(Comparator.comparingInt(ClanHall::getResidenceId)).collect(Collectors.toList());
final List<ClanHall> freeAuctionableHalls = new ArrayList<>();
for (ClanHall ch : _clanHalls.values())
{
if ((ch.getType() == ClanHallType.AUCTIONABLE) && (ch.getOwner() == null))
{
freeAuctionableHalls.add(ch);
}
}
Collections.sort(freeAuctionableHalls, Comparator.comparingInt(ClanHall::getResidenceId));
return freeAuctionableHalls;
}
/**

View File

@@ -19,12 +19,12 @@ package org.l2jmobius.gameserver.data.xml;
import java.io.File;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.logging.Logger;
import java.util.stream.Collectors;
import org.w3c.dom.Document;
import org.w3c.dom.NamedNodeMap;
@@ -212,7 +212,16 @@ public class ClanHallData implements IXmlReader
public List<ClanHall> getFreeAuctionableHall()
{
return _clanHalls.values().stream().filter(ch -> (ch.getType() == ClanHallType.AUCTIONABLE) && (ch.getOwner() == null)).sorted(Comparator.comparingInt(ClanHall::getResidenceId)).collect(Collectors.toList());
final List<ClanHall> freeAuctionableHalls = new ArrayList<>();
for (ClanHall ch : _clanHalls.values())
{
if ((ch.getType() == ClanHallType.AUCTIONABLE) && (ch.getOwner() == null))
{
freeAuctionableHalls.add(ch);
}
}
Collections.sort(freeAuctionableHalls, Comparator.comparingInt(ClanHall::getResidenceId));
return freeAuctionableHalls;
}
/**

View File

@@ -19,12 +19,12 @@ package org.l2jmobius.gameserver.data.xml;
import java.io.File;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.logging.Logger;
import java.util.stream.Collectors;
import org.w3c.dom.Document;
import org.w3c.dom.NamedNodeMap;
@@ -212,7 +212,16 @@ public class ClanHallData implements IXmlReader
public List<ClanHall> getFreeAuctionableHall()
{
return _clanHalls.values().stream().filter(ch -> (ch.getType() == ClanHallType.AUCTIONABLE) && (ch.getOwner() == null)).sorted(Comparator.comparingInt(ClanHall::getResidenceId)).collect(Collectors.toList());
final List<ClanHall> freeAuctionableHalls = new ArrayList<>();
for (ClanHall ch : _clanHalls.values())
{
if ((ch.getType() == ClanHallType.AUCTIONABLE) && (ch.getOwner() == null))
{
freeAuctionableHalls.add(ch);
}
}
Collections.sort(freeAuctionableHalls, Comparator.comparingInt(ClanHall::getResidenceId));
return freeAuctionableHalls;
}
/**

View File

@@ -19,12 +19,12 @@ package org.l2jmobius.gameserver.data.xml;
import java.io.File;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.logging.Logger;
import java.util.stream.Collectors;
import org.w3c.dom.Document;
import org.w3c.dom.NamedNodeMap;
@@ -212,7 +212,16 @@ public class ClanHallData implements IXmlReader
public List<ClanHall> getFreeAuctionableHall()
{
return _clanHalls.values().stream().filter(ch -> (ch.getType() == ClanHallType.AUCTIONABLE) && (ch.getOwner() == null)).sorted(Comparator.comparingInt(ClanHall::getResidenceId)).collect(Collectors.toList());
final List<ClanHall> freeAuctionableHalls = new ArrayList<>();
for (ClanHall ch : _clanHalls.values())
{
if ((ch.getType() == ClanHallType.AUCTIONABLE) && (ch.getOwner() == null))
{
freeAuctionableHalls.add(ch);
}
}
Collections.sort(freeAuctionableHalls, Comparator.comparingInt(ClanHall::getResidenceId));
return freeAuctionableHalls;
}
/**

View File

@@ -19,12 +19,12 @@ package org.l2jmobius.gameserver.data.xml;
import java.io.File;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.logging.Logger;
import java.util.stream.Collectors;
import org.w3c.dom.Document;
import org.w3c.dom.NamedNodeMap;
@@ -212,7 +212,16 @@ public class ClanHallData implements IXmlReader
public List<ClanHall> getFreeAuctionableHall()
{
return _clanHalls.values().stream().filter(ch -> (ch.getType() == ClanHallType.AUCTIONABLE) && (ch.getOwner() == null)).sorted(Comparator.comparingInt(ClanHall::getResidenceId)).collect(Collectors.toList());
final List<ClanHall> freeAuctionableHalls = new ArrayList<>();
for (ClanHall ch : _clanHalls.values())
{
if ((ch.getType() == ClanHallType.AUCTIONABLE) && (ch.getOwner() == null))
{
freeAuctionableHalls.add(ch);
}
}
Collections.sort(freeAuctionableHalls, Comparator.comparingInt(ClanHall::getResidenceId));
return freeAuctionableHalls;
}
/**

View File

@@ -19,12 +19,12 @@ package org.l2jmobius.gameserver.data.xml;
import java.io.File;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.logging.Logger;
import java.util.stream.Collectors;
import org.w3c.dom.Document;
import org.w3c.dom.NamedNodeMap;
@@ -212,7 +212,16 @@ public class ClanHallData implements IXmlReader
public List<ClanHall> getFreeAuctionableHall()
{
return _clanHalls.values().stream().filter(ch -> (ch.getType() == ClanHallType.AUCTIONABLE) && (ch.getOwner() == null)).sorted(Comparator.comparingInt(ClanHall::getResidenceId)).collect(Collectors.toList());
final List<ClanHall> freeAuctionableHalls = new ArrayList<>();
for (ClanHall ch : _clanHalls.values())
{
if ((ch.getType() == ClanHallType.AUCTIONABLE) && (ch.getOwner() == null))
{
freeAuctionableHalls.add(ch);
}
}
Collections.sort(freeAuctionableHalls, Comparator.comparingInt(ClanHall::getResidenceId));
return freeAuctionableHalls;
}
/**

View File

@@ -19,12 +19,12 @@ package org.l2jmobius.gameserver.data.xml;
import java.io.File;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.logging.Logger;
import java.util.stream.Collectors;
import org.w3c.dom.Document;
import org.w3c.dom.NamedNodeMap;
@@ -212,7 +212,16 @@ public class ClanHallData implements IXmlReader
public List<ClanHall> getFreeAuctionableHall()
{
return _clanHalls.values().stream().filter(ch -> (ch.getType() == ClanHallType.AUCTIONABLE) && (ch.getOwner() == null)).sorted(Comparator.comparingInt(ClanHall::getResidenceId)).collect(Collectors.toList());
final List<ClanHall> freeAuctionableHalls = new ArrayList<>();
for (ClanHall ch : _clanHalls.values())
{
if ((ch.getType() == ClanHallType.AUCTIONABLE) && (ch.getOwner() == null))
{
freeAuctionableHalls.add(ch);
}
}
Collections.sort(freeAuctionableHalls, Comparator.comparingInt(ClanHall::getResidenceId));
return freeAuctionableHalls;
}
/**

View File

@@ -19,12 +19,12 @@ package org.l2jmobius.gameserver.data.xml;
import java.io.File;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.logging.Logger;
import java.util.stream.Collectors;
import org.w3c.dom.Document;
import org.w3c.dom.NamedNodeMap;
@@ -212,7 +212,16 @@ public class ClanHallData implements IXmlReader
public List<ClanHall> getFreeAuctionableHall()
{
return _clanHalls.values().stream().filter(ch -> (ch.getType() == ClanHallType.AUCTIONABLE) && (ch.getOwner() == null)).sorted(Comparator.comparingInt(ClanHall::getResidenceId)).collect(Collectors.toList());
final List<ClanHall> freeAuctionableHalls = new ArrayList<>();
for (ClanHall ch : _clanHalls.values())
{
if ((ch.getType() == ClanHallType.AUCTIONABLE) && (ch.getOwner() == null))
{
freeAuctionableHalls.add(ch);
}
}
Collections.sort(freeAuctionableHalls, Comparator.comparingInt(ClanHall::getResidenceId));
return freeAuctionableHalls;
}
/**

View File

@@ -19,12 +19,12 @@ package org.l2jmobius.gameserver.data.xml;
import java.io.File;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.logging.Logger;
import java.util.stream.Collectors;
import org.w3c.dom.Document;
import org.w3c.dom.NamedNodeMap;
@@ -212,7 +212,16 @@ public class ClanHallData implements IXmlReader
public List<ClanHall> getFreeAuctionableHall()
{
return _clanHalls.values().stream().filter(ch -> (ch.getType() == ClanHallType.AUCTIONABLE) && (ch.getOwner() == null)).sorted(Comparator.comparingInt(ClanHall::getResidenceId)).collect(Collectors.toList());
final List<ClanHall> freeAuctionableHalls = new ArrayList<>();
for (ClanHall ch : _clanHalls.values())
{
if ((ch.getType() == ClanHallType.AUCTIONABLE) && (ch.getOwner() == null))
{
freeAuctionableHalls.add(ch);
}
}
Collections.sort(freeAuctionableHalls, Comparator.comparingInt(ClanHall::getResidenceId));
return freeAuctionableHalls;
}
/**

View File

@@ -19,12 +19,12 @@ package org.l2jmobius.gameserver.data.xml;
import java.io.File;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.logging.Logger;
import java.util.stream.Collectors;
import org.w3c.dom.Document;
import org.w3c.dom.NamedNodeMap;
@@ -212,7 +212,16 @@ public class ClanHallData implements IXmlReader
public List<ClanHall> getFreeAuctionableHall()
{
return _clanHalls.values().stream().filter(ch -> (ch.getType() == ClanHallType.AUCTIONABLE) && (ch.getOwner() == null)).sorted(Comparator.comparingInt(ClanHall::getResidenceId)).collect(Collectors.toList());
final List<ClanHall> freeAuctionableHalls = new ArrayList<>();
for (ClanHall ch : _clanHalls.values())
{
if ((ch.getType() == ClanHallType.AUCTIONABLE) && (ch.getOwner() == null))
{
freeAuctionableHalls.add(ch);
}
}
Collections.sort(freeAuctionableHalls, Comparator.comparingInt(ClanHall::getResidenceId));
return freeAuctionableHalls;
}
/**

View File

@@ -19,12 +19,12 @@ package org.l2jmobius.gameserver.data.xml;
import java.io.File;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.logging.Logger;
import java.util.stream.Collectors;
import org.w3c.dom.Document;
import org.w3c.dom.NamedNodeMap;
@@ -212,7 +212,16 @@ public class ClanHallData implements IXmlReader
public List<ClanHall> getFreeAuctionableHall()
{
return _clanHalls.values().stream().filter(ch -> (ch.getType() == ClanHallType.AUCTIONABLE) && (ch.getOwner() == null)).sorted(Comparator.comparingInt(ClanHall::getResidenceId)).collect(Collectors.toList());
final List<ClanHall> freeAuctionableHalls = new ArrayList<>();
for (ClanHall ch : _clanHalls.values())
{
if ((ch.getType() == ClanHallType.AUCTIONABLE) && (ch.getOwner() == null))
{
freeAuctionableHalls.add(ch);
}
}
Collections.sort(freeAuctionableHalls, Comparator.comparingInt(ClanHall::getResidenceId));
return freeAuctionableHalls;
}
/**

View File

@@ -19,12 +19,12 @@ package org.l2jmobius.gameserver.data.xml;
import java.io.File;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.logging.Logger;
import java.util.stream.Collectors;
import org.w3c.dom.Document;
import org.w3c.dom.NamedNodeMap;
@@ -212,7 +212,16 @@ public class ClanHallData implements IXmlReader
public List<ClanHall> getFreeAuctionableHall()
{
return _clanHalls.values().stream().filter(ch -> (ch.getType() == ClanHallType.AUCTIONABLE) && (ch.getOwner() == null)).sorted(Comparator.comparingInt(ClanHall::getResidenceId)).collect(Collectors.toList());
final List<ClanHall> freeAuctionableHalls = new ArrayList<>();
for (ClanHall ch : _clanHalls.values())
{
if ((ch.getType() == ClanHallType.AUCTIONABLE) && (ch.getOwner() == null))
{
freeAuctionableHalls.add(ch);
}
}
Collections.sort(freeAuctionableHalls, Comparator.comparingInt(ClanHall::getResidenceId));
return freeAuctionableHalls;
}
/**

View File

@@ -19,12 +19,12 @@ package org.l2jmobius.gameserver.data.xml;
import java.io.File;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.logging.Logger;
import java.util.stream.Collectors;
import org.w3c.dom.Document;
import org.w3c.dom.NamedNodeMap;
@@ -212,7 +212,16 @@ public class ClanHallData implements IXmlReader
public List<ClanHall> getFreeAuctionableHall()
{
return _clanHalls.values().stream().filter(ch -> (ch.getType() == ClanHallType.AUCTIONABLE) && (ch.getOwner() == null)).sorted(Comparator.comparingInt(ClanHall::getResidenceId)).collect(Collectors.toList());
final List<ClanHall> freeAuctionableHalls = new ArrayList<>();
for (ClanHall ch : _clanHalls.values())
{
if ((ch.getType() == ClanHallType.AUCTIONABLE) && (ch.getOwner() == null))
{
freeAuctionableHalls.add(ch);
}
}
Collections.sort(freeAuctionableHalls, Comparator.comparingInt(ClanHall::getResidenceId));
return freeAuctionableHalls;
}
/**