Data class used to report a participant's result in a match.
Constant Summary
int | MATCH_RESULT_DISAGREED | Constant indicating that this participant had different results reported by different clients. |
int | MATCH_RESULT_DISCONNECT | Constant indicating that this participant disconnected or left during the match. |
int | MATCH_RESULT_LOSS | Constant indicating that this participant lost the match. |
int | MATCH_RESULT_NONE | Constant indicating that this participant had no result for the match. |
int | MATCH_RESULT_TIE | Constant indicating that this participant tied the match. |
int | MATCH_RESULT_UNINITIALIZED | Constant indicating that this participant has not reported a result at all yet. |
int | MATCH_RESULT_WIN | Constant indicating that this participant won the match. |
int | PLACING_UNINITIALIZED | Constant returned by
getPlacing() if the participant has not reported a placing in the match
yet. |
Inherited Constant Summary
Field Summary
public static final Creator<ParticipantResult> | CREATOR |
Public Constructor Summary
ParticipantResult(String
participantId, int result, int placing)
|
Public Method Summary
String | |
int | |
int | |
void |
writeToParcel(Parcel out, int
flags)
|
Inherited Method Summary
Constants
public static final int MATCH_RESULT_DISAGREED
Constant indicating that this participant had different results reported by different clients.
public static final int MATCH_RESULT_DISCONNECT
Constant indicating that this participant disconnected or left during the match.
public static final int MATCH_RESULT_LOSS
Constant indicating that this participant lost the match.
public static final int MATCH_RESULT_NONE
Constant indicating that this participant had no result for the match.
public static final int MATCH_RESULT_TIE
Constant indicating that this participant tied the match.
public static final int MATCH_RESULT_UNINITIALIZED
Constant indicating that this participant has not reported a result at all yet. This
will commonly be seen when the match is currently in progress. Note that this is
distinct from
MATCH_RESULT_NONE
,
public static final int MATCH_RESULT_WIN
Constant indicating that this participant won the match.
public static final int PLACING_UNINITIALIZED
Constant returned by
getPlacing()
if the participant has not reported a placing in the match yet.
Usually seen when a match is still in progress.
Fields
public static final Creator<ParticipantResult> CREATOR
Public Constructors
public ParticipantResult (String participantId, int result, int placing)
Parameters
participantId | The ID of the participant this result is for. |
---|---|
result | The result type for this participant in the match. One of
MATCH_RESULT_WIN ,
MATCH_RESULT_LOSS ,
MATCH_RESULT_TIE ,
MATCH_RESULT_NONE ,
MATCH_RESULT_DISCONNECT , or
MATCH_RESULT_DISAGREED . |
placing | The placing of this participant in the match. Use
PLACING_UNINITIALIZED to indicate that no placing should be
reported. |
Public Methods
public String getParticipantId ()
Returns
- The ID of the participant this result is for.
public int getPlacing ()
Returns
- The placing of this participant in the match.
PLACING_UNINITIALIZED
means that this result has no placing value to report.
public int getResult ()
Returns
- The result type for this participant in the match. One of
MATCH_RESULT_WIN
,MATCH_RESULT_LOSS
,MATCH_RESULT_TIE
,MATCH_RESULT_NONE
,MATCH_RESULT_DISCONNECT
, orMATCH_RESULT_DISAGREED
.