All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.dc.riot.lol.rx.model.match.Frame Maven / Gradle / Ivy

There is a newer version: 1.0.5
Show newest version
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();
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy