Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  package com.robrua.orianna.type.core.currentgame;
  
  import java.util.List;
  
 
     private static final long serialVersionUID = 4888024655001066355L;
     private Champion champion;
     private List<MasteryRankmasteries;
     private List<RuneCountrunes;
     private SummonerSpell spell1spell2;
     private Summoner summoner;

    

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

    
Flag indicating whether or not this participant is a bot

Returns:
whether or not this participant is a bot
 
     public boolean getBot() {
         return super.getBoolean(.getBot());
     }

    
The champion this participant picked

Returns:
the champion this participant picked
 
     public Champion getChampion() {
         if( != null) {
             return ;
         }
 
         final Long l = .getChampionId();
         if(l == null) {
             throw new MissingDataException("Champion ID is null.");
         }
 
          = RiotAPI.getChampionByID(l.longValue());
         return ;
     }

    
The ID of the champion played by this participant

Returns:
the ID of the champion played by this participant
 
     public long getChampionID() {
         return super.getLong(.getChampionId());
     }

    
The masteries used by this participant

Returns:
the masteries used by this participant
 
     public List<MasteryRankgetMasteries() {
         if( == null) {
              = new ArrayList<>();
             for(final com.robrua.orianna.type.dto.currentgame.Mastery mastery : .getMasteries()) {
                 .add(new MasteryRank(mastery));
             }
         }
 
         return Collections.unmodifiableList();
     }

    
The ID of the profile icon used by this participant

Returns:
the ID of the profile icon used by this participant
 
     public long getProfileIconID() {
         return super.getLong(.getProfileIconId());
     }

    
The runes used by this participant

Returns:
the runes used by this participant
 
     public List<RuneCountgetRunes() {
         if( == null) {
             = new ArrayList<>();
            for(final com.robrua.orianna.type.dto.currentgame.Rune rune : .getRunes()) {
                .add(new RuneCount(rune));
            }
        }
        return Collections.unmodifiableList();
    }

    
The summoner for this participant

Returns:
the summoner for this participant
    public Summoner getSummoner() {
        if( != null) {
            return ;
        }
        final Long l = .getSummonerId();
        if(l == null) {
            throw new MissingDataException("Summoner ID is null.");
        }
         = RiotAPI.getSummonerByID(l.longValue());
        return ;
    }

    
The summoner ID of this participant

Returns:
the summoner ID of this participant
    public long getSummonerID() {
        return super.getLong(.getSummonerId());
    }

    
The summoner name of this participant

Returns:
the summoner name of this participant
    public String getSummonerName() {
        return super.getString(.getSummonerName());
    }

    
The first summoner spell

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

    
The ID of the first summoner spell used by this participant

Returns:
the ID of the first summoner spell used by this participant
    public long getSummonerSpell1ID() {
        return super.getLong(.getSpell1Id());
    }

    
The second summoner spell

Returns:
the second summoner spell
    public SummonerSpell getSummonerSpell2() {
        if( != null) {
            return ;
        }
        final Long l = .getSpell2Id();
        if(l == null) {
            throw new MissingDataException("Summoner Spell #2 ID is null.");
        }
         = RiotAPI.getSummonerSpell(l.longValue());
        return ;
    }

    
The ID of the second summoner spell used by this participant

Returns:
the ID of the second summoner spell used by this participant
    public long getSummonerSpell2ID() {
        return super.getLong(.getSpell2Id());
    }

    
The team that the participant is on

Returns:
the team that the participant is on
    public Side getTeam() {
        return Side.forID(super.getLong(.getTeamId()));
    }
    /*
     * (non-Javadoc)
     * @see java.lang.Object#toString()
     */
    @Override
    public String toString() {
        return "Participant (" + getSummonerName() + " as " + getChampion() + ")";
    }
New to GrepCode? Check out our FAQ X