org.dc.riot.lol.rx.model.match.Frame 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;
import java.util.HashMap;
import java.util.Map;
/**
* This object contains game frame information.
*
* @author Dc
* @since 1.0.0
*/
public class Frame {
private static long COUNT = 0;
public static long getInstanceCount() {
return COUNT;
}
private Event[] events;
private Map participantFrames;
private Long timestamp;
public Frame() {
COUNT++;
}
/**
* @return List of events for this frame.
*/
public Event[] getEvents() {
if (events == null) {
return new Event[0];
}
return events;
}
/**
* @return Map of each participant ID to the participant's information for the frame.
*/
public Map getParticipantFrames() {
if (participantFrames == null) {
return new HashMap();
}
return participantFrames;
}
/**
* @return Represents how many milliseconds into the game the frame occurred.
* -1
if not defined.
*/
public long getTimestamp() {
if (timestamp == null) {
return -1;
}
return timestamp.longValue();
}
}