org.dc.riot.lol.rx.model.match.ParticipantIdentity 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.match;
/**
* This object contains participant identity information.
*
*
* The embedded {@link Player} object is essentially a {@link
* org.dc.riot.lol.rx.model.summoner.SummonerDto SummonerDto}
* object.
*
* @author Dc
* @since 1.0.0
*/
public class ParticipantIdentity {
private static long COUNT = 0;
public static long getInstanceCount() {
return COUNT;
}
private Long participantId;
private Player player;
public ParticipantIdentity() {
COUNT++;
}
/**
* @return Participant ID or -1
* if not defined.
*/
public long getParticipantId() {
if (participantId == null) {
return -1;
}
return participantId.longValue();
}
/**
* @return Player information.
*/
public Player getPlayer() {
return player;
}
}