当前位置: 首页>>代码示例>>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;未经允许,请勿转载。