org.dc.riot.lol.rx.model.summoner.MasteryPagesDto Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of lol-api-rxjava Show documentation
Show all versions of lol-api-rxjava Show documentation
Service library for League of Legends API
package org.dc.riot.lol.rx.model.summoner;
/**
* This object contains masteries information.
*
* @author Dc
* @since 1.0.0
*/
public class MasteryPagesDto {
private static long COUNT = 0;
public static long getInstanceCount() {
return COUNT;
}
private Long summonerId;
private MasteryPageDto[] pages;
public MasteryPagesDto() {
COUNT++;
}
/**
* @return Summoner ID or -1
if not
* defined.
*/
public long getSummonerId() {
if (summonerId == null) {
return -1;
}
return summonerId.longValue();
}
/**
* Implementation note: could be empty if the player has no mastery
* pages. Likely to happen in the event of a mastery overhaul.
*
* @return Collection of mastery pages associated with the summoner.
*/
public MasteryPageDto[] getPages() {
if (pages == null) {
return new MasteryPageDto[0];
}
return pages;
}
}