本文整理匯總了Java中pro.lukasgorny.dto.FilterCriteria類的典型用法代碼示例。如果您正苦於以下問題:Java FilterCriteria類的具體用法?Java FilterCriteria怎麽用?Java FilterCriteria使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
FilterCriteria類屬於pro.lukasgorny.dto包,在下文中一共展示了FilterCriteria類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: getPlayerByCriteria
import pro.lukasgorny.dto.FilterCriteria; //導入依賴的package包/類
public Player getPlayerByCriteria(final String data, final FilterCriteria criteria) {
Player player = jsonToObject(data);
Optional<FilterCriteria> criteriaOptional = Optional.fromNullable(criteria);
if(criteriaOptional.isPresent()) {
Optional<PUBGMode> modeOptional = Optional.fromNullable(criteriaOptional.get().getMode());
Optional<PUBGRegion> regionOptional = Optional.fromNullable(criteriaOptional.get().getRegion());
Optional<PUBGSeason> seasonOptional = Optional.fromNullable(criteriaOptional.get().getSeason());
if (modeOptional.isPresent() && !regionOptional.isPresent() && !seasonOptional.isPresent()) {
filterByMode(player, criteria);
} else if (!modeOptional.isPresent() && regionOptional.isPresent() && !seasonOptional.isPresent()) {
filterByRegion(player, criteria);
} else if (!modeOptional.isPresent() && !regionOptional.isPresent() && seasonOptional.isPresent()) {
filterBySeason(player, criteria);
} else if (modeOptional.isPresent() && regionOptional.isPresent() && !seasonOptional.isPresent()) {
filterByModeAndRegion(player, criteria);
} else if (modeOptional.isPresent() && !regionOptional.isPresent() && seasonOptional.isPresent()) {
filterByModeAndSeason(player, criteria);
} else if (!modeOptional.isPresent() && regionOptional.isPresent() && seasonOptional.isPresent()) {
filterByRegionAndSeason(player, criteria);
} else if (modeOptional.isPresent() && regionOptional.isPresent() && seasonOptional.isPresent()) {
filterByRegionAndModeAndSeason(player, criteria);
}
}
return player;
}
示例2: filterByMode
import pro.lukasgorny.dto.FilterCriteria; //導入依賴的package包/類
private Player filterByMode(Player player, FilterCriteria criteria) {
List<Match> results = new ArrayList<>();
for (Match match : player.getMatches()) {
if(match.getMatchType().equals(criteria.getMode())) {
results.add(match);
}
}
player.setMatches(results);
return player;
}
示例3: filterByRegion
import pro.lukasgorny.dto.FilterCriteria; //導入依賴的package包/類
private Player filterByRegion(Player player, FilterCriteria criteria) {
List<Match> results = new ArrayList<>();
for (Match match : player.getMatches()) {
if(match.getRegion().equals(criteria.getRegion())) {
results.add(match);
}
}
player.setMatches(results);
return player;
}
示例4: filterBySeason
import pro.lukasgorny.dto.FilterCriteria; //導入依賴的package包/類
private Player filterBySeason(Player player, FilterCriteria criteria) {
List<Match> results = new ArrayList<>();
for (Match match : player.getMatches()) {
if(match.getSeason().equals(criteria.getSeason().getSeasonName())) {
results.add(match);
}
}
player.setMatches(results);
return player;
}
示例5: filterByModeAndRegion
import pro.lukasgorny.dto.FilterCriteria; //導入依賴的package包/類
private Player filterByModeAndRegion(Player player, FilterCriteria criteria) {
List<Match> results = new ArrayList<>();
for (Match match : player.getMatches()) {
if(match.getMatchType().equals(criteria.getMode()) && match.getRegion().equals(criteria.getRegion())) {
results.add(match);
}
}
player.setMatches(results);
return player;
}
示例6: filterByModeAndSeason
import pro.lukasgorny.dto.FilterCriteria; //導入依賴的package包/類
private Player filterByModeAndSeason(Player player, FilterCriteria criteria) {
List<Match> results = new ArrayList<>();
for (Match match : player.getMatches()) {
if(match.getMatchType().equals(criteria.getMode()) && match.getSeason().equals(criteria.getSeason().getSeasonName())) {
results.add(match);
}
}
player.setMatches(results);
return player;
}
示例7: filterByRegionAndSeason
import pro.lukasgorny.dto.FilterCriteria; //導入依賴的package包/類
private Player filterByRegionAndSeason(Player player, FilterCriteria criteria) {
List<Match> results = new ArrayList<>();
for (Match match : player.getMatches()) {
if(match.getRegion().equals(criteria.getRegion()) && match.getSeason().equals(criteria.getSeason().getSeasonName())) {
results.add(match);
}
}
player.setMatches(results);
return player;
}
示例8: filterByRegionAndModeAndSeason
import pro.lukasgorny.dto.FilterCriteria; //導入依賴的package包/類
private Player filterByRegionAndModeAndSeason(Player player, FilterCriteria criteria) {
List<Match> results = new ArrayList<>();
for (Match match : player.getMatches()) {
if(match.getRegion().equals(criteria.getRegion()) && match.getMatchType().equals(criteria.getMode())
&& match.getSeason().equals(criteria.getSeason().getSeasonName())) {
results.add(match);
}
}
player.setMatches(results);
return player;
}
示例9: filterByModeAndSeason
import pro.lukasgorny.dto.FilterCriteria; //導入依賴的package包/類
private Player filterByModeAndSeason(Player player, FilterCriteria criteria) {
player.setMatches(player.getMatches().stream()
.filter(match -> criteria.getSeason().getSeasonName().equals(match.getSeason()) && criteria.getMode().equals(match
.getMatchType())).collect(Collectors.toList()));
return player;
}
示例10: filterByRegionAndSeason
import pro.lukasgorny.dto.FilterCriteria; //導入依賴的package包/類
private Player filterByRegionAndSeason(Player player, FilterCriteria criteria) {
player.setMatches(player.getMatches().stream()
.filter(match -> criteria.getSeason().getSeasonName().equals(match.getSeason()) && criteria.getRegion()
.equals(match.getRegion()))
.collect(Collectors.toList()));
return player;
}
示例11: filterByRegionAndModeAndSeason
import pro.lukasgorny.dto.FilterCriteria; //導入依賴的package包/類
private Player filterByRegionAndModeAndSeason(Player player, FilterCriteria criteria) {
player.setMatches(player.getMatches().stream()
.filter(match -> criteria.getSeason().getSeasonName().equals(match.getSeason()) && criteria.getRegion()
.equals(match.getRegion())
&& criteria.getMode().equals(match.getMatchType())).collect(Collectors.toList()));
return player;
}
示例12: getByNickname
import pro.lukasgorny.dto.FilterCriteria; //導入依賴的package包/類
@Override
public Player getByNickname(@Nonnull final String nickname, final FilterCriteria criteria) {
String data = httpService.executeGetByNicknameAction(nickname);
return playerDataFilterService.getPlayerByCriteria(data, criteria);
}
示例13: getBySteamID
import pro.lukasgorny.dto.FilterCriteria; //導入依賴的package包/類
@Override
public Player getBySteamID(@Nonnull final String steamID, final FilterCriteria criteria) {
String data = httpService.executeGetBySteamIDAction(steamID);
return playerDataFilterService.getPlayerByCriteria(data, criteria);
}
示例14: filterByMode
import pro.lukasgorny.dto.FilterCriteria; //導入依賴的package包/類
private Player filterByMode(Player player, FilterCriteria criteria) {
player.setMatches(player.getMatches().stream().filter(match -> criteria.getMode().equals(match.getMatchType())).collect(Collectors.toList()));
return player;
}
示例15: filterByRegion
import pro.lukasgorny.dto.FilterCriteria; //導入依賴的package包/類
private Player filterByRegion(Player player, FilterCriteria criteria) {
player.setMatches(player.getMatches().stream().filter(match -> criteria.getRegion().equals(match.getRegion())).collect(Collectors.toList()));
return player;
}