本文整理汇总了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;
}
示例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;
}
示例3: getRegion
import pro.lukasgorny.enums.PUBGRegion; //导入依赖的package包/类
public PUBGRegion getRegion() {
return region;
}
示例4: setRegion
import pro.lukasgorny.enums.PUBGRegion; //导入依赖的package包/类
public void setRegion(PUBGRegion region) {
this.region = region;
}