当前位置: 首页>>代码示例>>Java>>正文


Java PUBGRegion类代码示例

本文整理汇总了Java中pro.lukasgorny.enums.PUBGRegion的典型用法代码示例。如果您正苦于以下问题:Java PUBGRegion类的具体用法?Java PUBGRegion怎么用?Java PUBGRegion使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


PUBGRegion类属于pro.lukasgorny.enums包,在下文中一共展示了PUBGRegion类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getPlayerByCriteria

import pro.lukasgorny.enums.PUBGRegion; //导入依赖的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: FilterCriteria

import pro.lukasgorny.enums.PUBGRegion; //导入依赖的package包/类
public FilterCriteria(final PUBGMode mode, final PUBGRegion region, final PUBGSeason season) {
    this.mode = mode;
    this.region = region;
    this.season = season;
}
 
开发者ID:Lukaszpg,项目名称:jPUBG-Android,代码行数:6,代码来源:FilterCriteria.java

示例3: getRegion

import pro.lukasgorny.enums.PUBGRegion; //导入依赖的package包/类
public PUBGRegion getRegion() {
    return region;
}
 
开发者ID:Lukaszpg,项目名称:jPUBG-Android,代码行数:4,代码来源:FilterCriteria.java

示例4: setRegion

import pro.lukasgorny.enums.PUBGRegion; //导入依赖的package包/类
public void setRegion(PUBGRegion region) {
    this.region = region;
}
 
开发者ID:Lukaszpg,项目名称:jPUBG-Android,代码行数:4,代码来源:FilterCriteria.java


注:本文中的pro.lukasgorny.enums.PUBGRegion类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。