當前位置: 首頁>>代碼示例>>Java>>正文


Java FilterCriteria類代碼示例

本文整理匯總了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;
}
 
開發者ID:Lukaszpg,項目名稱:jPUBG-Android,代碼行數:29,代碼來源:PlayerDataFilterService.java

示例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;
}
 
開發者ID:Lukaszpg,項目名稱:jPUBG-Android,代碼行數:12,代碼來源:PlayerDataFilterService.java

示例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;
}
 
開發者ID:Lukaszpg,項目名稱:jPUBG-Android,代碼行數:12,代碼來源:PlayerDataFilterService.java

示例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;
}
 
開發者ID:Lukaszpg,項目名稱:jPUBG-Android,代碼行數:13,代碼來源:PlayerDataFilterService.java

示例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;
}
 
開發者ID:Lukaszpg,項目名稱:jPUBG-Android,代碼行數:13,代碼來源:PlayerDataFilterService.java

示例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;
}
 
開發者ID:Lukaszpg,項目名稱:jPUBG-Android,代碼行數:13,代碼來源:PlayerDataFilterService.java

示例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;
}
 
開發者ID:Lukaszpg,項目名稱:jPUBG-Android,代碼行數:13,代碼來源:PlayerDataFilterService.java

示例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;
}
 
開發者ID:Lukaszpg,項目名稱:jPUBG-Android,代碼行數:14,代碼來源:PlayerDataFilterService.java

示例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;
}
 
開發者ID:Lukaszpg,項目名稱:jPUBG,代碼行數:8,代碼來源:PlayerDataFilterService.java

示例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;
}
 
開發者ID:Lukaszpg,項目名稱:jPUBG,代碼行數:9,代碼來源:PlayerDataFilterService.java

示例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;
}
 
開發者ID:Lukaszpg,項目名稱:jPUBG,代碼行數:9,代碼來源:PlayerDataFilterService.java

示例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);
}
 
開發者ID:Lukaszpg,項目名稱:jPUBG-Android,代碼行數:6,代碼來源:JPubgImpl.java

示例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);
}
 
開發者ID:Lukaszpg,項目名稱:jPUBG-Android,代碼行數:6,代碼來源:JPubgImpl.java

示例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;
}
 
開發者ID:Lukaszpg,項目名稱:jPUBG,代碼行數:5,代碼來源:PlayerDataFilterService.java

示例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;
}
 
開發者ID:Lukaszpg,項目名稱:jPUBG,代碼行數:5,代碼來源:PlayerDataFilterService.java


注:本文中的pro.lukasgorny.dto.FilterCriteria類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。