pro.lukasgorny.services.DataAppendService Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jpubg-android Show documentation
Show all versions of jpubg-android Show documentation
Simple API wrapper written in Java for retriving statistics from http://pubgtracker.com API.
This is Android version without Java 8 features to provide full compatibility with Android.
package pro.lukasgorny.services;
import pro.lukasgorny.dto.Match;
import pro.lukasgorny.dto.Player;
import pro.lukasgorny.dto.Stat;
import pro.lukasgorny.enums.PUBGSeason;
/**
* Created by Łukasz "Husar" Górny on 2017-07-24.
*/
public class DataAppendService {
private MatchValidationService matchValidationService;
public DataAppendService() {
this.matchValidationService = new MatchValidationService();
}
public Player appendSeasonToStats(Player player) {
matchValidationService.validate(player.getMatches());
for (Match match : player.getMatches()) {
for (Stat stat : match.getStats()) {
stat.setSeason(PUBGSeason.findByKey(match.getSeason()));
}
}
return player;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy