Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package com.robrua.orianna.type.core.stats;
 
 
     private static final long serialVersionUID = -6400924448623294320L;
    private Champion champion;
    private AggregatedStats stats;

    

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

    
Champion the stats are for. Null represents combined stats for all champions.

Returns:
champion the stats are for. Null represents combined stats for all champions.
    public Champion getChampion() {
        if( != null) {
            return ;
        }
        final Integer i = .getId();
        if(i == null) {
            throw new MissingDataException("Champion ID is null.");
        }
        else if(i == 0) {
            return null;
        }
         = RiotAPI.getChampion(i.longValue());
        return ;
    }

    
ID of the champion the stats are for. 0 represents combined stats for all champions.

Returns:
ID of the champion the stats are for. 0 represents combined stats for all champions.
    public int getChampionID() {
        return super.getInteger(.getId());
    }

    
Aggregated stats associated with the champion

Returns:
aggregated stats associated with the champion.
    public AggregatedStats getStats() {
        if( == null) {
             = new AggregatedStats(.getStats());
        }
        return ;
    }
    /*
     * (non-Javadoc)
     * @see java.lang.Object#toString()
     */
    @Override
    public String toString() {
        return "ChampionStats (" + getChampion() + ")";
    }
New to GrepCode? Check out our FAQ X