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

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

There is a newer version: 1.0.5
Show newest version
package org.dc.riot.lol.rx.model.match;

/**
 * This object contains game timeline information.
 * 
 * @author Dc
 * @since 1.0.0
 */
public class Timeline {
	private static long COUNT = 0;
	public static long getInstanceCount() {
		return COUNT;
	}
	
	private Long frameInterval;	
	private Frame[] frames;	
	
	public Timeline() {
		COUNT++;
	}

	/**
	 * @return Time between each returned frame in
	 * milliseconds or 0 if not
	 * defined.
	 */
	public long getFrameInterval() {
		if (frameInterval == null) {
			return 0;
		}

		return frameInterval.longValue();
	}

	/**
	 * @return List of timeline frames for the game or
	 * empty if not defined.
	 */
	public Frame[] getFrames() {
		if (frames == null) {
			return new Frame[0];
		}

		return frames;
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy