cleanup: replace anonymous inner class with lambda
This commit is contained in:
@@ -19,34 +19,15 @@
|
||||
*/
|
||||
package maplequestitemfetcher;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStreamReader;
|
||||
import java.io.PrintWriter;
|
||||
import java.sql.Connection;
|
||||
import java.sql.DriverManager;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.Comparator;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.Set;
|
||||
|
||||
import org.apache.commons.io.FileUtils;
|
||||
import java.io.File;
|
||||
import tools.MapleItemInformationProvider;
|
||||
|
||||
import tools.Pair;
|
||||
|
||||
import java.io.*;
|
||||
import java.sql.*;
|
||||
import java.util.*;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author RonanLana
|
||||
@@ -434,12 +415,7 @@ public class MapleQuestItemFetcher {
|
||||
list.add(e);
|
||||
}
|
||||
|
||||
Collections.sort(list, new Comparator<Entry<Integer, Integer>>() {
|
||||
@Override
|
||||
public int compare(Entry<Integer, Integer> o1, Entry<Integer, Integer> o2) {
|
||||
return o1.getKey() - o2.getKey();
|
||||
}
|
||||
});
|
||||
Collections.sort(list, (o1, o2) -> o1.getKey() - o2.getKey());
|
||||
|
||||
return list;
|
||||
}
|
||||
@@ -450,12 +426,7 @@ public class MapleQuestItemFetcher {
|
||||
list.add(e);
|
||||
}
|
||||
|
||||
Collections.sort(list, new Comparator<Entry<Integer, int[]>>() {
|
||||
@Override
|
||||
public int compare(Entry<Integer, int[]> o1, Entry<Integer, int[]> o2) {
|
||||
return o1.getKey() - o2.getKey();
|
||||
}
|
||||
});
|
||||
Collections.sort(list, (o1, o2) -> o1.getKey() - o2.getKey());
|
||||
|
||||
return list;
|
||||
}
|
||||
@@ -468,22 +439,12 @@ public class MapleQuestItemFetcher {
|
||||
il.add(i);
|
||||
}
|
||||
|
||||
Collections.sort(il, new Comparator<Integer>() {
|
||||
@Override
|
||||
public int compare(Integer o1, Integer o2) {
|
||||
return o1 - o2;
|
||||
}
|
||||
});
|
||||
Collections.sort(il, (o1, o2) -> o1 - o2);
|
||||
|
||||
list.add(new Pair<>(e.getKey(), il));
|
||||
}
|
||||
|
||||
Collections.sort(list, new Comparator<Pair<Integer, List<Integer>>>() {
|
||||
@Override
|
||||
public int compare(Pair<Integer, List<Integer>> o1, Pair<Integer, List<Integer>> o2) {
|
||||
return o1.getLeft() - o2.getLeft();
|
||||
}
|
||||
});
|
||||
Collections.sort(list, (o1, o2) -> o1.getLeft() - o2.getLeft());
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user