public final class

EventEntity

extends Object
implements Parcelable Event
java.lang.Object
   ↳ com.google.android.gms.games.event.EventEntity

Class Overview

Data object representing the data for a event. This is immutable, and therefore safe to cache or store. Note, however, that the data it represents may grow stale.

Summary

[Expand]
Inherited Constants
From interface android.os.Parcelable
Fields
public static final EventEntityCreator CREATOR
Public Constructors
EventEntity(Event event)
Public Methods
int describeContents()
boolean equals(Object obj)
Event freeze()
Freeze a volatile representation into an immutable representation.
String getDescription()
Retrieves the description for this event.
void getDescription(CharArrayBuffer dataOut)
Loads the event description into the given CharArrayBuffer.
String getEventId()
Retrieves the ID of this event.
String getFormattedValue()
Retrieves the sum of increments have been made to this event (formatted for the user's locale).
void getFormattedValue(CharArrayBuffer dataOut)
Retrieves the sum of increments have been made to this event (formatted for the user's locale).
Uri getIconImageUri()
Retrieves a URI that can be used to load the event's image icon.
String getIconImageUrl()
void getName(CharArrayBuffer dataOut)
Loads the event name into the given CharArrayBuffer.
String getName()
Retrieves the name of this event.
Player getPlayer()
Retrieves the player information associated with this event.
long getValue()
Retrieves the number of increments this user has made to this event.
int hashCode()
boolean isDataValid()
Check to see if this object is valid for use.
boolean isVisible()
Retrieves whether the event should be displayed to the user in any event related UIs.
String toString()
void writeToParcel(Parcel out, int flags)
[Expand]
Inherited Methods
From class java.lang.Object
From interface android.os.Parcelable
From interface com.google.android.gms.common.data.Freezable
From interface com.google.android.gms.games.event.Event

Fields

public static final EventEntityCreator CREATOR

Public Constructors

public EventEntity (Event event)

Public Methods

public int describeContents ()

public boolean equals (Object obj)

public Event freeze ()

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.
 
 

Returns
  • A concrete implementation of the data object.

public String getDescription ()

Retrieves the description for this event.

Returns
  • The event description.

public void getDescription (CharArrayBuffer dataOut)

Loads the event description into the given CharArrayBuffer.

Parameters
dataOut The buffer to load the data into.

public String getEventId ()

Retrieves the ID of this event.

Returns
  • The event ID.

public String getFormattedValue ()

Retrieves the sum of increments have been made to this event (formatted for the user's locale).

Returns
  • The formatted number of increments this user has made to this event.

public void getFormattedValue (CharArrayBuffer dataOut)

Retrieves the sum of increments have been made to this event (formatted for the user's locale).

Parameters
dataOut The buffer to load the data into.

public Uri getIconImageUri ()

Retrieves a URI that can be used to load the event's image icon. Returns null if the event has no image.

To retrieve the Image from the Uri, use ImageManager.

Returns
  • The image URI for the achievement's unlocked image icon, or null if the achievement has no unlocked image.

public String getIconImageUrl ()

public void getName (CharArrayBuffer dataOut)

Loads the event name into the given CharArrayBuffer.

Parameters
dataOut The buffer to load the data into.

public String getName ()

Retrieves the name of this event.

Returns
  • The event name.

public Player getPlayer ()

Retrieves the player information associated with this event.

Note that this object is a volatile representation, so it is not safe to cache the output of this directly. Instead, cache the result of freeze().

Returns
  • The player associated with this event.

public long getValue ()

Retrieves the number of increments this user has made to this event.

Returns
  • The number of increments this user has made to this event.

public int hashCode ()

public boolean isDataValid ()

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.

Returns
  • whether or not the object is valid for use.

public boolean isVisible ()

Retrieves whether the event should be displayed to the user in any event related UIs.

Returns
  • Whether to display the event to the user.

public String toString ()

public void writeToParcel (Parcel out, int flags)