Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  package com.robrua.orianna.type.core.league;
  
  
     private static final long serialVersionUID = -3761278269953249105L;
     private MiniSeries miniSeries;
     private Summoner summoner;
     private Team team;

    

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

    
The league division of the participant

Returns:
the league division of the participant
 
     public String getDivision() {
         return super.getString(.getDivision());
     }

    
Specifies if the participant is fresh blood

Returns:
whether the participant is fresh blood
 
     public boolean getFreshBlood() {
         return super.getBoolean(.getIsFreshBlood());
     }

    
Specifies if the participant is on a hot streak

Returns:
whether participant is on a hot streak
 
     public boolean getHotStreak() {
         return super.getBoolean(.getIsHotStreak());
     }

    
The ID of the participant (i.e., summoner or team) represented by this entry

Returns:
the ID of the participant (i.e., summoner or team) represented by this entry
 
     public String getID() {
         return super.getString(.getPlayerOrTeamId());
     }

    
Specifies if the participant is inactive

Returns:
whether the participant is inactive
 
     public boolean getInactive() {
         return super.getBoolean(.getIsInactive());
     }

    
The league points of the participant

Returns:
the league points of the participant
 
     public int getLeaguePoints() {
         return super.getInteger(.getLeaguePoints());
     }

    
The number of losses for the participant

Returns:
the number of losses for the participant
 
     public int getLosses() {
         return super.getInteger(.getLosses());
     }

    
Mini series data for the participant. Only present if the participant is currently in a mini series.

Returns:
mini series data for the participant if the participant is currently in one.
 
     public MiniSeries getMiniSeries() {
         if( == null) {
              = new MiniSeries(.getMiniSeries());
         }
 
        return ;
    }

    
The name of the the participant (i.e., summoner or team) represented by this entry

Returns:
the name of the the participant (i.e., summoner or team) represented by this entry
    public String getName() {
        return super.getString(.getPlayerOrTeamName());
    }

    
The summoner, if the ID is a summoner ID

Returns:
the summoner, or null if the ID is a team ID
    public Summoner getSummoner() {
        if( != null) {
            return ;
        }
        final String s = .getPlayerOrTeamId();
        if(s == null) {
            throw new MissingDataException("Player/Team ID is null.");
        }
        try {
            final long summonerID = Long.parseLong(s);
             = RiotAPI.getSummonerByID(summonerID);
            return ;
        }
        catch(final NumberFormatException e) {
            return null;
        }
    }

    
The team, if the ID is a team ID

Returns:
the team, or null if the ID is a summoner ID
    public Team getTeam() {
        if( != null) {
            return ;
        }
        final String s = .getPlayerOrTeamId();
        if(s == null) {
            throw new MissingDataException("Player/Team ID is null.");
        }
        try {
            Long.parseLong(s);
            // If the string fits into a long it's a summoner ID, not a team ID
            return null;
        }
        catch(final NumberFormatException e) {
             = RiotAPI.getTeam(s);
            return ;
        }
    }

    
Specifies if the participant is a veteran

Returns:
whether the participant is a veteran
    public boolean getVeteran() {
        return super.getBoolean(.getIsVeteran());
    }

    
The number of wins for the participant

Returns:
the number of wins for the participant
    public int getWins() {
        return super.getInteger(.getWins());
    }
    /*
     * (non-Javadoc)
     * @see java.lang.Object#toString()
     */
    @Override
    public String toString() {
        return "LeagueEntry (" + getName() + " " + getLeaguePoints() + "LP)";
    }
New to GrepCode? Check out our FAQ X