java.lang.Object | |
↳ | com.google.android.gms.games.multiplayer.turnbased.TurnBasedMatchEntity |
Data object representing the data for a turn-based match. This is immutable, and therefore safe to cache or store. Note, however, that the data it represents may grow stale.
This class exists solely to support parceling these objects and should not be used directly.
[Expand]
Inherited Constants | |||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
![]()
| |||||||||||||||||||||||||||||||||||||||||
![]()
|
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
CREATOR |
[Expand]
Inherited Fields | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
![]()
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Return whether or not this match can be rematched.
| |||||||||||
Freeze a volatile representation into an immutable representation.
| |||||||||||
Retrieves the automatch criteria used to create or join this match, if any.
| |||||||||||
Return the maximum number of available automatch slots for this match.
| |||||||||||
Return the current (game-specific) data for this match.
| |||||||||||
Loads the match description into the given
CharArrayBuffer .
| |||||||||||
Get the participant representing the primary opponent in the match.
| |||||||||||
Get the ID of another participant in the match that can be used when describing the
participants the user is playing with.
| |||||||||||
Return the timestamp at which the match was last modified.
| |||||||||||
Return the ID of the participant who updated the match most recently.
| |||||||||||
Return the match sequence number for this match.
| |||||||||||
Get a participant in a match by its ID.
| |||||||||||
Get the participant ID for a given player.
| |||||||||||
Get the IDs of the participants of the given match.
| |||||||||||
Get the status of a participant in a match.
| |||||||||||
Retrieve the
Participant s for this object.
| |||||||||||
Return the ID of the participant that is considered pending.
| |||||||||||
Return the match data from the previous match, if available.
| |||||||||||
Return the match ID of the rematch that was created from this match, if any.
| |||||||||||
Return the current version of the match.
| |||||||||||
Check to see if this object is valid for use.
| |||||||||||
Return whether or not this match has been locally modified.
| |||||||||||
[Expand]
Inherited Methods | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
![]() | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
![]()
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
![]()
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
![]()
|
Return whether or not this match can be rematched. This will return true when the match has complete and has not already been rematched.
Freeze a volatile representation into an immutable representation. Objects returned from this call are safe to cache.
Note that the output of freeze
may not be identical to the parent object, but should
be equal. In other words:
Freezable f1 = new Freezable();
Freezable f2 = f1.freeze();
f1 == f2 may not be true.
f1.equals(f2) will be true.
Retrieves the automatch criteria used to create or join this match, if any. May be null if the match has no automatch properties.
Return the maximum number of available automatch slots for this match. If automatch criteria were not specified during match creation, or if all slots have been filled, this will return 0.
Return the current (game-specific) data for this match.
Loads the match description into the given CharArrayBuffer
.
dataOut | The buffer to load the data into. |
---|
Get the participant representing the primary opponent in the match.
Note that this will return null
if there is no primary opponent. This could happen if
an automatch slot has not been filled.
Get the ID of another participant in the match that can be used when describing the participants the user is playing with. For example, in a four player match this might be used to state "Martha (and 2 others)".
Note that this will return null
if there is no primary opponent. This could happen if
an automatch slot has not been filled.
Return the timestamp at which the match was last modified.
Return the ID of the participant who updated the match most recently.
Return the match sequence number for this match. This number starts at 1, and increases every time a rematch is created.
Get a participant in a match by its ID. Note that the participant ID must correspond to a participant in this match, or this method will throw an exception.
participantId | Match-local ID of the participant to retrieve status for. |
---|
Get the participant ID for a given player. This will only return a non-null ID if the player is actually a participant in the match and that player's identity is visible to the current player. Note that this will always return non-null for the current player.
To find the player ID for the current player, use getCurrentPlayerId(GoogleApiClient)
.
playerId | Player ID to find participant ID for. |
---|
Get the IDs of the participants of the given match.
Get the status of a participant in a match. Note that the participant ID must correspond to a participant in this match, or this method will throw an exception.
participantId | Match-local ID of the participant to retrieve status for. |
---|
STATUS_INVITED
, STATUS_JOINED
,
STATUS_DECLINED
, STATUS_LEFT
,
or STATUS_NOT_INVITED_YET
.Retrieve the Participant
s for this object. This is a list of all Participants
applicable to the given object.
Participant
s for this object.
Return the ID of the participant that is considered pending. If no participant is considered pending (ie, the match is over, etc), this function will return null.
Return the match data from the previous match, if available. Note that this is only provided on the first turn of a rematched match.
Return the match ID of the rematch that was created from this match, if any. This will only be non-null if a rematch has been created.
Return the current version of the match.
Check to see if this object is valid for use. If the object is still volatile, this method
will indicate whether or not the object can be safely used. The output of a call to
freeze()
will always be valid.
Return whether or not this match has been locally modified. If this is true, the local device
has match state which has not successfully synced to the server yet. In this state, further
mutations to the match will fail with a status of
STATUS_MATCH_ERROR_LOCALLY_MODIFIED
.