mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 20:28:00 +00:00
Initial migration
This commit is contained in:
@@ -27,7 +27,6 @@ import forge.util.ItemPoolSorter;
|
||||
import forge.util.MyRandom;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map.Entry;
|
||||
@@ -198,7 +197,7 @@ public class CardPool extends ItemPool<PaperCard> {
|
||||
|
||||
public String toCardList(String separator) {
|
||||
List<Entry<PaperCard, Integer>> main2sort = Lists.newArrayList(this);
|
||||
Collections.sort(main2sort, ItemPoolSorter.BY_NAME_THEN_SET);
|
||||
main2sort.sort(ItemPoolSorter.BY_NAME_THEN_SET);
|
||||
final CardDb commonDb = StaticData.instance().getCommonCards();
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
|
||||
@@ -123,7 +123,7 @@ public class Deck extends DeckBase implements Iterable<Entry<DeckSection, CardPo
|
||||
result.add(c.getKey());
|
||||
}
|
||||
if (result.size() > 1) { //sort by type so signature spell comes after oathbreaker
|
||||
Collections.sort(result, new Comparator<PaperCard>() {
|
||||
result.sort(new Comparator<PaperCard>() {
|
||||
@Override
|
||||
public int compare(final PaperCard c1, final PaperCard c2) {
|
||||
return Boolean.compare(c1.getRules().canBeSignatureSpell(), c2.getRules().canBeSignatureSpell());
|
||||
|
||||
@@ -79,7 +79,7 @@ public class DeckGroup extends DeckBase {
|
||||
if (aiDecks.size() < 2) {
|
||||
return;
|
||||
}
|
||||
Collections.sort(aiDecks, comparator);
|
||||
aiDecks.sort(comparator);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -518,7 +518,7 @@ public class FCollection<T> implements List<T>, /*Set<T>,*/ FCollectionView<T>,
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public void sort(final Comparator<? super T> comparator) {
|
||||
Collections.sort(list, comparator);
|
||||
list.sort(comparator);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -132,7 +132,7 @@ public final class MapToAmountUtil {
|
||||
for (final Entry<T, Integer> entry : map.entrySet()) {
|
||||
entries.add(Pair.of(entry.getKey(), entry.getValue()));
|
||||
}
|
||||
Collections.sort(entries, new Comparator<Entry<T, Integer>>() {
|
||||
entries.sort(new Comparator<Entry<T, Integer>>() {
|
||||
@Override
|
||||
public int compare(final Entry<T, Integer> o1, final Entry<T, Integer> o2) {
|
||||
return o1.getValue().compareTo(o2.getValue());
|
||||
|
||||
Reference in New Issue
Block a user