Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  package com.robrua.orianna.type.core.game;
  
  import java.util.Date;
  import java.util.List;
  
 
 public class Game extends OriannaObject<com.robrua.orianna.type.dto.game.Game> {
     private static final long serialVersionUID = 2934777978027724335L;
     private Champion champion;
     private List<PlayerfellowPlayers;
     private SummonerSpell spell1spell2;
     private RawStats stats;

    

Parameters:
data the underlying dto
 
     public Game(final com.robrua.orianna.type.dto.game.Game data) {
         super(datacom.robrua.orianna.type.dto.game.Game.class);
     }

    
Champion associated with game

Returns:
champion associated with game
 
     public Champion getChampion() {
         if( != null) {
             return ;
         }
 
         final Integer i = .getChampionId();
         if(i == null) {
             throw new MissingDataException("Champion ID is null.");
         }
 
          = RiotAPI.getChampionByID(i.longValue());
         return ;
     }

    
Champion ID associated with game

Returns:
champion ID associated with game
 
     public long getChampionID() {
         return super.getInteger(.getChampionId());
     }

    
Date that end game data was recorded

Returns:
date that end game data was recorded
 
     public Date getCreateDate() {
         return super.getDate(.getCreateDate());
     }

    
Other players associated with the game

Returns:
other players associated with the game
 
     public List<PlayergetFellowPlayers() {
         if( == null) {
              = new ArrayList<>();
             for(final com.robrua.orianna.type.dto.game.Player player : .getFellowPlayers()) {
                 .add(new Player(player));
             }
         }
 
         return Collections.unmodifiableList();
     }

    
Game ID

Returns:
game ID
 
     public long getID() {
         return super.getLong(.getGameId());
     }

    
Invalid flag

Returns:
invalid flag
    public boolean getInvalid() {
        return super.getBoolean(.getInvalid());
    }

    
IP Earned

Returns:
IP Earned
    public int getIPEarned() {
        return super.getInteger(.getIpEarned());
    }

    
Level

Returns:
level
    public int getLevel() {
        return super.getInteger(.getLevel());
    }

    
Map

Returns:
map
    public GameMap getMap() {
        return GameMap.forID(super.getInteger(.getMapId()));
    }

    
Game mode

Returns:
game mode
    public GameMode getMode() {
        return GameMode.valueOf(super.getString(.getGameMode()));
    }

    
Statistics associated with the game for this summoner

Returns:
statistics associated with the game for this summoner
    public RawStats getStats() {
        if( == null) {
             = new RawStats(.getStats());
        }
        return ;
    }

    
Game sub-type

Returns:
game sub-type
    public SubType getSubType() {
        return SubType.valueOf(super.getString(.getSubType()));
    }

    
First summoner spell

Returns:
first summoner spell
    public SummonerSpell getSummonerSpell1() {
        if( != null) {
            return ;
        }
        final Integer i = .getSpell1();
        if(i == null) {
            throw new MissingDataException("Summoner Spell #1 ID is null.");
        }
         = RiotAPI.getSummonerSpell(i.longValue());
        return ;
    }

    
ID of first summoner spell

Returns:
ID of first summoner spell
    public long getSummonerSpell1ID() {
        return super.getInteger(.getSpell1());
    }

    
First summoner spell

Returns:
first summoner spell
    public SummonerSpell getSummonerSpell2() {
        if( != null) {
            return ;
        }
        final Integer i = .getSpell2();
        if(i == null) {
            throw new MissingDataException("Summoner Spell #2 ID is null.");
        }
         = RiotAPI.getSummonerSpell(i.longValue());
        return ;
    }

    
ID of second summoner spell

Returns:
ID of second summoner spell
    public long getSummonerSpell2ID() {
        return super.getInteger(.getSpell2());
    }

    
Team associated with the game

Returns:
team associated with the game
    public Side getTeam() {
        return Side.forID(super.getInteger(.getTeamId()));
    }

    
Game type

Returns:
game type
    public GameType getType() {
        return GameType.valueOf(super.getString(.getGameType()));
    }
    /*
     * (non-Javadoc)
     * @see java.lang.Object#toString()
     */
    @Override
    public String toString() {
        return "Game (" + getChampion() + " @ " + getCreateDate() + ")";
    }
New to GrepCode? Check out our FAQ X