Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  package com.robrua.orianna.type.core.match;
  
  import java.util.List;
  import java.util.Map;
  
 
 public class Event extends OriannaObject<com.robrua.orianna.type.dto.match.Event> {
     private static final long serialVersionUID = -5805690031607393709L;
     private final Participant creatorparticipantvictim;
     private Item itemAfteritemBeforeitem;
     private final List<Participantparticipants;
     private Position position;

    

Parameters:
data the underlying dto
participants the participants
 
     public Event(final com.robrua.orianna.type.dto.match.Event datafinal Map<IntegerParticipantparticipants) {
         super(datacom.robrua.orianna.type.dto.match.Event.class);
         this. = new ArrayList<>();
         for(final Integer ID : data.getAssistingParticipantIds()) {
             this..add(participants.get(ID));
         }
          = participants.get(data.getCreatorId());
          = participants.get(data.getParticipantId());
          = participants.get(data.getVictimId());
     }

    
The ascended type of the event. Only present if relevant. Note that CLEAR_ASCENDED refers to when a participants kills the ascended player.

Returns:
the ascended type of the event
 
     public AscendedType getAscendedType() {
         try {
             return AscendedType.valueOf(super.getString(.getAscendedType()));
         }
         catch(final IllegalArgumentException e) {
             return null;
         }
     }

    
The assisting participant IDs of the event. Only present if relevant.

Returns:
the assisting participants
 
         return Collections.unmodifiableList();
     }

    
The building type of the event. Only present if relevant.

Returns:
the building type of the event
 
     public BuildingType getBuildingType() {
         try {
             return BuildingType.valueOf(super.getString(.getBuildingType()));
         }
         catch(final IllegalArgumentException e) {
             return null;
         }
     }

    
The creator ID of the event. Only present if relevant.

Returns:
the creator ID of the event
 
     public Participant getCreator() {
         return ;
     }

    
Event type

Returns:
event type
 
     public EventType getEventType() {
         try {
             return EventType.valueOf(super.getString(.getEventType()));
         }
         catch(final IllegalArgumentException e) {
             return null;
         }
     }

    
The ending item of the event. Only present if relevant.

Returns:
the ending item of the event
    public Item getItem() {
        if( != null) {
            return ;
        }
        final Integer i = .getItemId();
        if(i == null) {
            throw new MissingDataException("Item ID is null.");
        }
         = RiotAPI.getItem(i.longValue());
        return ;
    }

    
The ending item of the event. Only present if relevant.

Returns:
the ending item of the event
    public Item getItemAfter() {
        if( != null) {
            return ;
        }
        final Integer i = .getItemAfter();
        if(i == null) {
            throw new MissingDataException("Item After ID is null.");
        }
         = RiotAPI.getItem(i.longValue());
        return ;
    }

    
The ending item ID of the event. Only present if relevant.

Returns:
the ending item ID of the event
    public long getItemAfterID() {
        return super.getInteger(.getItemAfter());
    }

    
The ending item of the event. Only present if relevant.

Returns:
the ending item of the event
    public Item getItemBefore() {
        if( != null) {
            return ;
        }
        final Integer i = .getItemBefore();
        if(i == null) {
            throw new MissingDataException("Item Before ID is null.");
        }
         = RiotAPI.getItem(i.longValue());
        return ;
    }

    
The starting item ID of the event. Only present if relevant.

Returns:
the starting item ID of the event
    public long getItemBeforeID() {
        return super.getInteger(.getItemBefore());
    }

    
The item ID of the event. Only present if relevant.

Returns:
the item ID of the event
    public long getItemID() {
        return super.getInteger(.getItemId());
    }

    
The killer ID of the event. Only present if relevant. Killer ID 0 indicates a minion.

Returns:
the killer ID of the event
    public int getKillerID() {
        return super.getInteger(.getKillerId());
    }

    
The lane type of the event. Only present if relevant.

Returns:
the lane type of the event
    public LaneType getLaneType() {
        try {
            return LaneType.valueOf(super.getString(.getLaneType()));
        }
        catch(final IllegalArgumentException e) {
            return null;
        }
    }

    
The level up type of the event. Only present if relevant.

Returns:
the level up type of the event
    public LevelUpType getLevelUpType() {
        try {
            return LevelUpType.valueOf(super.getString(.getLevelUpType()));
        }
        catch(final IllegalArgumentException e) {
            return null;
        }
    }

    
The monster type of the event. Only present if relevant.

Returns:
the monster type of the event
    public MonsterType getMonsterType() {
        try {
            return MonsterType.valueOf(super.getString(.getMonsterType()));
        }
        catch(final IllegalArgumentException e) {
            return null;
        }
    }

    
The participant of the event. Only present if relevant.

Returns:
the participant of the event
    public Participant getParticipant() {
        return ;
    }

    
The point captured in the event. Only present if relevant.

Returns:
the point captured in the event
    public Point getPointCaptured() {
        try {
            return Point.valueOf(super.getString(.getPointCaptured()));
        }
        catch(final IllegalArgumentException e) {
            return null;
        }
    }

    
The position of the event. Only present if relevant.

Returns:
the position of the event
    public Position getPosition() {
        if( == null) {
             = new Position(.getPosition());
        }
        return ;
    }

    
The skill slot of the event. Only present if relevant.

Returns:
the skill slot of the event
    public int getSkillSlot() {
        return super.getInteger(.getSkillSlot());
    }

    
The team of the event. Only present if relevant.

Returns:
the team of the event
    public Side getTeam() {
        return Side.forID(super.getInteger(.getTeamId()));
    }

    
Represents how many milliseconds into the game the event occurred.

Returns:
how many milliseconds into the game the event occurred
    public long getTimestamp() {
        return super.getLong(.getTimestamp());
    }

    
The tower type of the event. Only present if relevant.

Returns:
the tower type of the event
    public TowerType getTowerType() {
        try {
            return TowerType.valueOf(super.getString(.getTowerType()));
        }
        catch(final IllegalArgumentException e) {
            return null;
        }
    }

    
The victim of the event. Only present if relevant.

Returns:
the victim of the event
    public Participant getVictim() {
        return ;
    }

    
The ward type of the event. Only present if relevant.

Returns:
the ward type of the event
    public WardType getWardType() {
        try {
            return WardType.valueOf(super.getString(.getWardType()));
        }
        catch(final IllegalArgumentException e) {
            return null;
        }
    }
    /*
     * (non-Javadoc)
     * @see java.lang.Object#toString()
     */
    @Override
    public String toString() {
        return "Event";
    }
New to GrepCode? Check out our FAQ X