EventEntity

public final class EventEntity extends Object
implements Parcelable Event

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.

Inherited Constant Summary

Field Summary

public static final Creator<EventEntity> CREATOR

Public Constructor Summary

Public Method Summary

boolean
Event
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.
void
getFormattedValue(CharArrayBuffer dataOut)
Retrieves the sum of increments have been made to this event (formatted for the user's locale).
String
getFormattedValue()
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
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
boolean
boolean
isVisible()
Retrieves whether the event should be displayed to the user in any event related UIs.
String
void
writeToParcel(Parcel out, int flags)

Inherited Method Summary

Fields

public static final Creator<EventEntity> CREATOR

Public Constructors

public EventEntity (Event event)

Public Methods

public boolean equals (Object obj)

public Event freeze ()

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 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 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 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 Freezable.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 ()

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)