mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2025-03-10 05:39:19 +01:00
Removed UserInfoNameComparator - not used
This commit is contained in:
parent
44bc2c01fa
commit
f7e28346e9
@ -1,34 +0,0 @@
|
||||
/*
|
||||
* This file is part of Player Analytics (Plan).
|
||||
*
|
||||
* Plan is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License v3 as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* Plan is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with Plan. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.djrapitops.plan.utilities.comparators;
|
||||
|
||||
import com.djrapitops.plan.data.container.UserInfo;
|
||||
|
||||
import java.util.Comparator;
|
||||
|
||||
/**
|
||||
* Comparator for UserInfo for Alphabetical Name order.
|
||||
*
|
||||
* @author Rsl1122
|
||||
*/
|
||||
public class UserInfoNameComparator implements Comparator<UserInfo> {
|
||||
|
||||
@Override
|
||||
public int compare(UserInfo u1, UserInfo u2) {
|
||||
return u1.getName().compareTo(u2.getName());
|
||||
}
|
||||
}
|
@ -20,7 +20,6 @@ import com.djrapitops.plan.data.WebUser;
|
||||
import com.djrapitops.plan.data.container.GeoInfo;
|
||||
import com.djrapitops.plan.data.container.Session;
|
||||
import com.djrapitops.plan.data.container.TPS;
|
||||
import com.djrapitops.plan.data.container.UserInfo;
|
||||
import com.djrapitops.plan.data.store.keys.SessionKeys;
|
||||
import com.djrapitops.plan.system.locale.Message;
|
||||
import com.djrapitops.plan.system.locale.lang.CmdHelpLang;
|
||||
@ -78,19 +77,6 @@ public class ComparatorTest {
|
||||
assertEquals(expected, result);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void userDataNameComparator() {
|
||||
List<UserInfo> userInfo = RandomData.randomUserData();
|
||||
|
||||
List<String> expected = userInfo.stream().map(UserInfo::getName)
|
||||
.sorted().collect(Collectors.toList());
|
||||
|
||||
userInfo.sort(new UserInfoNameComparator());
|
||||
List<String> result = userInfo.stream().map(UserInfo::getName).collect(Collectors.toList());
|
||||
|
||||
assertEquals(expected, result);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void webUserComparator() throws PassEncryptUtil.CannotPerformOperationException {
|
||||
List<WebUser> webUsers = RandomData.randomWebUsers();
|
||||
|
Loading…
Reference in New Issue
Block a user