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

org.dc.riot.lol.rx.model.game.RecentGamesDto Maven / Gradle / Ivy

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

/**
 * This object contains recent games information.
 * 
 * @author Dc
 * @since 1.0.0
 */
public class RecentGamesDto {
	private static long COUNT = 0;
	public static long getInstanceCount() {
		return COUNT;
	}

    private GameDto[] games;
    private Long summonerId;
    
    public RecentGamesDto() {
    	COUNT++;
    }

    /**
     * @return Collection of recent games played (max 10)
     * or empty if not defined.
     */
    public GameDto[] getGames() {
    	if (games == null) {
    		return new GameDto[0];
    	}

        return games;
    }

    /**
     * @return Summoner ID or -1
     * if not defined.
     */
    public long getSummonerId() {
    	if (summonerId == null) {
    		return -1;
    	}

        return summonerId.longValue();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy