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 Frame extends OriannaObject<com.robrua.orianna.type.dto.match.Frame> {
    private static final long serialVersionUID = 8025192341833725847L;
    private List<Eventevents;
    private final Map<IntegerParticipantparticipants;

    

Parameters:
data the underlying dto
participants the participants
    public Frame(final com.robrua.orianna.type.dto.match.Frame datafinal Map<IntegerParticipantparticipants) {
        super(datacom.robrua.orianna.type.dto.match.Frame.class);
        this. = participants;
    }

    
List of events for this frame

Returns:
list of events for this frame
    public List<EventgetEvents() {
        if( == null) {
             = new ArrayList<>();
            for(final com.robrua.orianna.type.dto.match.Event event : .getEvents()) {
                .add(new Event(event));
            }
        }
        return Collections.unmodifiableList();
    }

    
The participant's information for the frame

Parameters:
participant the participant
Returns:
the participant's information for the frame
    public ParticipantFrame getFrameForParticipant(final Participant participant) {
        if( == null) {
             = new HashMap<>();
            for(final String ID : .getParticipantFrames().keySet()) {
                .put(new Integer(ID), new ParticipantFrame(.getParticipantFrames().get(ID)));
            }
        }
        return .get(participant.getParticipantID());
    }

    
Map of each participant ID to the participant's information for the frame

Returns:
map of each participant ID to the participant's information for the frame
        if( == null) {
             = new HashMap<>();
            for(final String ID : .getParticipantFrames().keySet()) {
                .put(new Integer(ID), new ParticipantFrame(.getParticipantFrames().get(ID)));
            }
        }
        return Collections.unmodifiableMap();
    }

    
Represents how many milliseconds into the game the frame occurred

Returns:
how many milliseconds into the game the frame occurred
    public long getTimestamp() {
        return super.getLong(.getTimestamp());
    }
    /*
     * (non-Javadoc)
     * @see java.lang.Object#toString()
     */
    @Override
    public String toString() {
        return "Frame (" + getTimestamp() + "ms)";
    }
New to GrepCode? Check out our FAQ X