當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。